MS Translator connector might be using the wrong endpoint

Create issue
Issue #657 resolved
Martn Wunderl created an issue

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)

  1. Chase Tingley

    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.

  2. Martn Wunderl 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.

  3. Mike Bryant

    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?

  4. Log in to comment