DeepL free API: Error: Wrong endpoint. Use https://api-free.deepl.com

Created on 28 May 2025, 4 days ago

Problem/Motivation

When selecting the DeepL Pro API checkbox in the settings, saving and afterwards removing it again, translations do not work anymore with the following error:
Translation API error: Client error: `POST https://api.deepl.com/v2/translate` resulted in a `403 Forbidden` response: {"message":"Wrong endpoint. Use https://api-free.deepl.com. You can find more info in our docs: https://developers.deepl (truncated...)

Steps to reproduce

Select DeepL as API.
Enter free tier API key in the settings.
Check "Use DeepL Pro API" (I know this does not make sense).
Save.
Uncheck the "Use DeepL Pro API" checkbox.
Save.
Translate some content.
Get error "Translation API error: Client error: `POST https://api.deepl.com/v2/translate` resulted in a `403 Forbidden` response: {"message":"Wrong endpoint. Use https://api-free.deepl.com. You can find more info in our docs: https://developers.deepl (truncated...)"

Proposed resolution

The relevant code expects a value of "0" if the free tier API is to be used. However, an unchecked checkbox produces "false" in my case. I don't know where this "0" comes from, but I had it as well and it worked. I think this is the default value before clicking anything. I reads the config value, which is still unset (and not false).

I'll try to fix this.

🐛 Bug report
Status

Active

Version

1.4

Component

Code

Created by

🇦🇹Austria tgoeg

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024