HTTP Status 12029 for OpenAI but not other APIs

A client on Windows 7 using my API code in Access 2003 VBA is getting a error ‘resource not found’ with http status 12029 using the “MSXML2.XMLHTTP” library.
Error “12029” is a WinHTTP error code that indicates that a socket connection failed because encrypted communication could not be established .
The endpoint is definitely “https://api.OpenAI.com/v1/completions” and pasting that into a browser gets the expected error message about no API key.
Googling tells me that it’s something to do with TLS support. However, three other translation APIs work just fine in the same application: Google Translate, Microsoft Azure, and DeepL.
What’s different about OpenAI ?

All four APIs work fine on my PC with Windows 10 and Office 365, so this could be a legacy Win7 thing. Still, the fact that Azure and DeepL work at present is curious, so I’d like to know what I have to do differently in Access 2003 VBA and Windows 7 to get specifically OpenAI to work.

Maybe you should consider using a Python OpenAI API package for your Windows 7 environment?

What API wrapper are you using now?

:question:

1 Like

The “MSXML2.XMLHTTP” library, which is what is available in their Access application.

I suggest you use either the Python wrapper, the node.js wrapper or the Ruby wrapper (gem), depending on your programming skills.

1 Like

That would require the remote client installing more software, and the scripting plumbing to connect Python and MSAccess. For the moment, I’m looking for solutions that work within the Msaccess VBA host. I’ll edit the post to add more info.

1 Like

You need to find a way to enable tls 1.2 in your code

It will probably fix your issue. The security level at open ai requires tls 1.2 (or higher) other sites don’t always require this to do SSL

It is a much safer connection method

1 Like

The client has Windows 7.
MS say:

They have SP1 and KB314025 installed and the registry keys to enable TLS 1.2. But it still does not work. They get an error -2146697111, resource not found.
They will give up on Win 7 and get a Win10 machine. That works.