Error 400 on Bing Translator
sanslash332 opened this issue · 4 comments
Hello,
I am developing a small translating tool that helps blind people to play some foreign games that sends their texts to the clipboard, and this tools automatically capture these text, translate it and sent it to the active screen reader of the blind player.
Currently I have compativility with the azure translator service, and an unstable api from google.
I checked your bing translator classes and I tried to use it on my project, but... ¿these classes are working?
Bing responds status 400. I changed anything of your class; only instantiate it and calls the method translateAsync from the BingsTranslatorApi class.
Of course, with a 400 bad request answer, the json deserialice fails.
So, what i'm doing bad?
My project is this:
https://github.com/sanslash332/tfj-sayclip/
(the changes with bing translator aren't pushed to github for now)
Thanks for any answer, and please; if you have problems for that I'm using your classes, please tell me and I remove all stuff from fergun of my project.
Thanks!
Hello, it seems that Bing changed something in their API that now returns error 400.
I thought this was a temporary error since GitHub Actions IPs are most of the time blocked by Bing, but I ran the tests in my machine and I'm getting the same error.
I saw the requests that Bing makes in Bing Translator and apparently now the API uses a token and a key to authenticate the requests.
I'll do some research later to find a way to get or generate the token/key.
I suggest you use my other translation API, GTranslate, it uses a stable internal Google Translate API to make the translations.
You can use GTranslate and any other code in this repository in your project as long as the license is there.
O, thanks @d4n3436
Please, if you find a fix for the bing api, please comment here :)
About the GTranslate api, yes, is awesome. I've already tested it and works like a charm.
Thanks for do it :)
And OK. I recently added to the project the license, and links to this project in the readme.
If you want, can you please check it to see if all is OK?
Again, thanks for your work, and the bot :)
And... far from this topic. This bot is related in some way with the railgun discord Bot?
https://github.com/ComputerMaster1st/Railgun
Thanks for all!
Please, if you find a fix for the bing api, please comment here :)
I will close this issue after committing the fix for Bing Translator. The commit that fixes the bug will appear below.
If you want, can you please check it to see if all is OK?
You also have to add your name in your LICENSE
file since it's your project, lol
Example:
MIT License
Copyright (c) 2021 sanslash332
Copyright (c) 2020 d4n3436
...
This bot is related in some way with the railgun discord Bot?
Nope
o! lol! I didn't saw that line! 🤣
Thanks @d4n3436 for the ovservation I'll change it on the next commit.
:)