Skip to content

DeepL authentication method is deprecated (auth_key no longer supported) #60

@suicatokyo

Description

@suicatokyo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions