Unable to translate due to the Unauthorized error

Sunil Ferro 0 Reputation points
2024-08-21T12:18:37.0966667+00:00

I am using the ‘AzureAITranslator’ API for text translation. After a few days of usage, I am getting this error:

StatusCode: 401, ReasonPhrase: 'Unauthorized'

I tried the following steps to get it to work but still getting the 'Unauthorized' error.

  1. I initially used Key 1 for text translation. I changed it to Key 2.

 Keys

  1. Regenerated both the keys.  

 Following is the code being used:  

 

private static string key ="-------";
private static readonly string endpoint = "https://api.cognitive.microsofttranslator.com/";
private static readonly string region = "-------";
public static async Task
Azure Translator
Azure Translator
An Azure service to easily conduct machine translation with a simple REST API call.
412 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VasaviLankipalle-MSFT 17,641 Reputation points
    2024-08-21T23:08:21.03+00:00

    Hello @Sunil Ferro Thanks for using Microsoft Q&A Platform.

    May I know the pricing tier you are working on? We have seen this issue with free tier and upgrading to standard tier solves the issue.

    If you still face issue, please raise a support ticket in the Azure Portal.

    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.