Getting previously resolved error regarding access with keys

Fatima Masood 20 Reputation points
2024-09-12T08:21:18.1733333+00:00

Hi everyone,

I was previously able to resolve this error when I was working on my code to read from an sql database: NotFoundError: Error code: 404 - {'error': {'code': 'DeploymentNotFound', 'message': 'The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.'}}
When I fixed it previously it was due to me using the wrong API key.

However, the next day, I was getting the same error with the same keys and endpoints. I also tried to regenerate the keys, but that didn't work either. Now, I am getting this error: openai.AuthenticationError: Error code: 401 - {'statusCode': 401, 'message': 'Unauthorized. Access token is missing, invalid, audience is incorrect (https://cognitiveservices.azure.com), or have expired.'}
I have double, triple, quadruple checked my keys, endpoint, deployment names and model, but it's still not working. Is there a way to resolve this.

Thanks a lot.

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,276 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,921 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.