-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Hello,
It appears that the current implementation of the DeepL API in this project uses a deprecated authentication method.
In functions/translate.ts the request is sent with:
body.append("auth_key", authKey);
However, according to DeepL's official documentation, the legacy authentication method (auth_key in query/body) was deprecated and removed in November 2025.
Now authentication must be provided using the HTTP header:
Authorization: DeepL-Auth-Key <API_KEY>
Because of this change, the current implementation returns:
403 Forbidden
"Please make sure if the DEEPL_AUTH_KEY is correct."
even when the API key is valid.
Suggested fix:
Replace
body.append("auth_key", authKey);
with an Authorization header:
headers: {
"content-type": "application/x-www-form-urlencoded;charset=utf-8",
"Authorization": DeepL-Auth-Key ${authKey}
}
Example:
const deeplResponse = await fetch(url, {
method: "POST",
headers: {
"content-type": "application/x-www-form-urlencoded;charset=utf-8",
"Authorization": DeepL-Auth-Key ${authKey},
},
body,
});
DeepL documentation:
https://developers.deepl.com/docs/resources/breaking-changes-change-notices/november-2025-deprecation-of-legacy-auth-methods
After applying this change, the translation works correctly.
Thank you for maintaining this project.