Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send corretions with out a API key #490

Closed
www2000 opened this issue Sep 10, 2023 · 5 comments
Closed

Send corretions with out a API key #490

www2000 opened this issue Sep 10, 2023 · 5 comments

Comments

@www2000
Copy link

www2000 commented Sep 10, 2023

Hi i wand to send corrections to the server but when i sent the server ask for a api key
error:
Visit https://portal.libretranslate.com to get an API key
i like there an option for a free api key for sending corrections or a with sending corrections with out a key

@pierotofy
Copy link
Member

Mm, technically we should allow suggestions to be sent without an API key, so this is probably a bug.

@www2000
Copy link
Author

www2000 commented Sep 11, 2023

Thanks.
For context i use the online translator at https://libretranslate.com/ for doing this.

@PJ-Finlay
Copy link
Contributor

PJ-Finlay commented Sep 30, 2023

I wrote a Python script to submit LibreTranslate suggestions to test this bug.

I wasn't able to recreate the issue locally. When I run LibreTranslate with this configuration the suggest endpoint works:

python main.py --suggestions --api-keys --req-limit 10
$ python demo.py 
Status code: 200
{'success': True}

However, I see the same bug when trying to connect to LibreTranslate.com:

$ python demo.py 
Status code: 400
{'error': 'Visit https://portal.libretranslate.com to get an API key'}

Based on my reading of the code it seems like you should be able to make suggest requests as long as your IP address isn't over the request limit. I can make translate requests to LibreTranslate.com so I don't think I'm over the limit and don't know what the problem is.

@PJ-Finlay
Copy link
Contributor

I see there's a recent commit touching this code so it's possible I'm running a newer version than LibreTranslate.com:
cb11dfc

@www2000
Copy link
Author

www2000 commented Sep 30, 2023

@PJ-Finlay what i understand of the code is for upload json.
The problem is that there is a api key need for sending a correction using the api or the website.
I have no problem with a free api key that is limit for sending corrections.
But this limit the current grow of LibreTranslate.

argosopentech pushed a commit to argosopentech/LibreTranslate that referenced this issue Oct 1, 2023
Remove the access check when a user submits
a suggestion. This allows submitting translation
suggestions without an API key or secret.

LibreTranslate#490
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants