Libretranslate Error creating API key

What app is this about, and its version: Libretranslate 1.9.5~ynh1
What YunoHost version are you running: 12.1.39
What type of hardware are you using: VPS bought online

Describe your issue

I cannot create an API key. The following message appears:

/var/www/libretranslate/venv/lib/python3.11/site-packages/requests/init.py:109: RequestsDependencyWarning: urllib3 (2.6.3) or chardet (7.4.0.post2)/charset_normalizer (3.4.6) doesn’t match a supported version!
warnings.warn(
community

Share relevant logs or error messages

https://paste.yunohost.org/raw/otusayodah

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.

Hello @syrabo!

I’ve just tried on my server and it seems the api creation works great, there only is a warning about dependency. Am I right you named your api key “community”?

You can check all your api keys with ltmanage keys.

I’ve created an api key named my_key, added it in LibreTranslate and now I can see during translation:

Hello Tho,

Thank you for your response. I’ll get back to it and go through it again.

Best regards,

Hi
How did you make an API key?
Did you set a number of queries per minute, a character limit?

yunohost app shell libretranslate

Following command will create the my_key api key, with a value of 120 requests per minutes (-1 = unlimited IIRC). You can add other arguments (check ltmanage –help for this), but the requests per minutes is mandatory.

ltmanage keys add my_key 120

To view your keys, you can just

ltmanage keys

Set the number of queries with no character limit.

I’ve always wondered what’s the point of defining a number of queries, with or without a character limit?
Is this to avoid abuse?

Anyway, thank you

Yes, mainly, but also if you want to sell api keys

Selling API keys, I didn’t know it was possible.
Having said that, avoiding abuse could be a good thing.
Thank you :folded_hands: