Microsoft Translator API - Bad request problem RRS feed

  • Question

  • Hi,

    I've seen threads on this issue but my problem is particularly confusing. I have a free $2m character subscription, a valid client id and secret. When I run my code I get to call the API a few times successfully (the most I've seen is 75 consecutive successful calls). Then every other call returns a Bad request response: The remote server returned an error: (400) Bad Request.

    I create the token once with my credentials and never create it again. I loop through a file, parse it, and submit every parsed string for translation by calling the API. It seems that I reach some sort of limit that I'm now aware of.

    When looking at my account, it doesn't seem to be discounting the characters that I've translated already which would make me highly suspicious that I have the wrong credentials when creating the token. I quadruple-checked that and everything seems to be ok.

    Any guidance on what I may be missing here would be much appreciated.



    Paulo de Oliveira

    Monday, August 15, 2016 9:50 PM


  • Hi Paulo de Oliveira,

    According to your description and error message, it seems that the token is invalid when you get the exception. From the following document, we know that the Token is valid for 10 minutes. Please create the token again before it is invalid.


    Best regards,

    Cole Wu

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Hart Wang Tuesday, August 30, 2016 9:59 AM
    • Marked as answer by DotNet Wang Wednesday, August 31, 2016 1:33 AM
    Tuesday, August 16, 2016 3:05 AM