Authentication issue with Translation API (using subscription key)

Nicholaus Chipping 0 Reputation points
2023-10-17T13:50:23.2033333+00:00

I've been following the directions posted on https://video2.skills-academy.com/en-us/azure/ai-services/translator/reference/v3-0-reference#authenticating-with-an-access-token, and using the header approach (passing the Ocp-Apim-Subscription-Key as a header in my curl request). The endpoint I'm trying to hit is:

https://api.cognitive.microsoft.com/sts/v1.0/issueToken

The issue is that every time I hit it, with either of my keys (even if I generate new ones), I get a 401 Access Denied message. Has anyone else successfully gotten past this issue?

Azure Translator
Azure Translator
An Azure service to easily conduct machine translation with a simple REST API call.
393 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,833 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VasaviLankipalle-MSFT 17,121 Reputation points
    2023-10-19T04:37:21.08+00:00

    Hello @Nicholaus Chipping , I have reproduced the same it worked well on my end. I would suggest you to check all the necessary permissions to access the Translation API.

    Try verifying the roles for your resource (Azure portal->Resource->Access control) like contributor, role-based access control (RBAC) settings for the resource. Please go through this documentation: https://video2.skills-academy.com/en-us/azure/ai-services/translator/document-translation/how-to-guides/create-use-managed-identities

    Make sure your subscription, and resource is valid. Generally, these are the features that are available in the F0 pricing: https://azure.microsoft.com/en-us/pricing/details/cognitive-services/translator/

    User's image

    At least try different authentication method and see if that helps. https://video2.skills-academy.com/en-us/azure/ai-services/translator/reference/v3-0-reference#authenticating-with-an-access-token

    Please let us know if you still face issue.

    Regards,
    Vasavi

    0 comments No comments

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.