MS Translator connector might be using the wrong endpoint
I tried to get the Microsoft Translator working, but our account specifies the following endpoint: https://api.cognitive.microsoft.com/sts/v1.0 Okapi on the other hand is using this (in MicrosoftMTAPIImpl): http://api.microsofttranslator.com/v2/Http.svc
So, which one is correct? Is the connector working fine for others at the moment? Maybe the endpoint should be part of the parameters, so that it can be configured (optionally) in the pipeline step config.
Comments (7)
-
-
Hi Martin,
We use the cognitive/sts endpoint to fetch the Azure token that's used to authenticate subsequent calls, see this code. That may be the cause of the confusion.
I'm ok with having a parameter to expose the URI, because just the other day I was talking to a user who is working with MS on a strange corner case bug, and MS asked them to use a different endpoint (a specific machine, I think), that had newer code.
-
reporter OK, thanks a lot, Chase and Yves. If or when I have time, I'll look into externalising the URL, but I don't know, yet, when that might be.
-
It appears net.sf.okapi.connectors.microsoft.MicrosoftMTAPIImpl is using version 2 of the Cognitive Services Translator Text API. I received an email from Microsoft that version 2 will be deprecated on April 20, 2019 and that I should migrate to version 3.
The email included a link for the migration: https://docs.microsoft.com/en-us/azure/cognitive-services/translator/migrate-to-v3
The end point for V3 is https://api.cognitive.microsofttranslator.com/translate?api-version=3.0
Should a new issue be filed to cover the work needed for the migration?
-
https://docs.microsoft.com/en-us/azure/cognitive-services/translator/reference/v3-0-reference list 4 different base end points, depending on the regions. So this should be configurable. I'll try to fix this if it's easy (most likely) while implementing issue
#789. -
-
assigned issue to
- marked as enhancement
- changed milestone to M38
-
assigned issue to
-
- changed status to resolved
The new parameter
baseURL
has been added to the Microsoft Connector. Commit 5805003. - Log in to comment
We use the MS Translator connector everyday and it seems to work OK.
The documentation (like here: http://docs.microsofttranslator.com/text-translate.html#!/default/post_GetTranslations ) use the second URI, like in the connector.
But I think it would be fine to have the URI as an parameter (optional to keep things backward compatible). As long as they serve the same API it should be fine.