Im getting 401 Unauthorized error

Adrian 20 Reputation points
2024-06-23T20:42:09.0866667+00:00

Hi guys

The Cognitive resource api is returning 401 Unauthorized error. im trying to access it, and this is the error im getting, i trued this a while back and it was fine but now, im trying nonuse the same error happens,\

Thank you

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,254 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,908 questions
0 comments No comments
{count} votes

Accepted answer
  1. Azar 22,950 Reputation points MVP
    2024-06-23T21:26:18.34+00:00

    Hey there Adrian

    So thw "401 Unauthorized" error indicates that there is an issue with authentication or authorization when accessing the Azure Cognitive Services API.

    let me drop you a few troubleshoots\

    • Make sure that you are using the correct API key to authenticate your requests. The API key should be generated from the Azure portal and correctly included in the request headers.
    • Double-check the endpoint URL used in your application to make sure it matches the endpoint URL provided in the Azure portal for the specific Cognitive Services resource.
    • Make sure that your Azure subscription includes access to the Cognitive Services resource and that the resource has been provisioned and configured correctly in the Azure portal.\

    If this hep[s kindly accept the answer.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.