Microsoft Translator API Cognitive Services - What is the correct endpoint?

1.3k views Asked by At

The Microsoft Azure portal for TextTranslator provides the following endpoint:

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

Yet this endpoint returns a 200 for issueToken and 404 for Translate. The samples refer to an endpoint of:

https://api.microsofttranslator.com/v2/http.svc/

The docs being out of date given the translator ending in the datamarket was my initial assumption. However, the doc endpoint returns for the Translate method.

http://docs.microsofttranslator.com/text-translate.html#!/default/get_Translate

Which endpoint is it that we should use?

If supposed to use the api.microsofttranslator.com then what is the api.cognitive.microsoft.com in azure for?

2

There are 2 answers

3
cthrash On BEST ANSWER

For the translator API, you need to first get an auth token (first link), and with this token you can call the Translate api (second link).

You can learn more about the auth step here.

0
bluish On

You can use Microsoft Translator API in 2 ways (see the docs):