Cognitive Transliterate API

Pushpinder Bharaj 1 Reputation point
2021-02-18T11:12:09.917+00:00

Unable to hit Cognitive transliterate API using subscription ID. Below is the URL & Request body.

https://api.cognitive.microsofttranslator.com/transliterate?api-version=3.0&language=en&fromScript=en&toScript=hi

Header:

  1. Content-Type: application/json
  2. Content-Length
  3. Ocp-Apim-Subscription-Key: Subscription ID(Trying free)

Request Param:

  1. api-version: 3.0
  2. language: en
  3. fromScript: en
  4. toScript: hi

Request Body:
[
{"Text":"I am an Engineer."},
{"Text":"Trying the microsoft translator."}
]

Everytime I get 400 error saying: "The request is not authorized because credentials are missing or invalid."

I have subscribed to the Cognitive Translator service on trail basis. I have just received the Subscription ID, what I am using in the "Ocp-Apim-Subscription-Key". is this correct?

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
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. GiftA-MSFT 11,166 Reputation points
    2021-02-18T23:18:09.567+00:00

    Hi, you need to provide your subscription key which is located in Azure Portal > Translator Resource > Resource Management > Keys and Endpoint.

    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.