DaveWilliamson
DaveWilliamson

Reputation: 370

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

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?

Upvotes: 6

Views: 1543

Answers (2)

bluish
bluish

Reputation: 27400

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

Upvotes: 3

cthrash
cthrash

Reputation: 2973

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.

Upvotes: 2

Related Questions