Share via

Authentication issue with Translation API (using subscription key)

Anonymous
2023-10-17T13:50:23.2033333+00:00

I've been following the directions posted on https://learn.microsoft.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 in Foundry Tools
Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform


1 answer

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

    Hello @Anonymous , 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://learn.microsoft.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://learn.microsoft.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

    Was this answer helpful?

    0 comments No comments

Your answer

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