Description:
After upgrading to Rocket.Chat 8.5.1, DeepL AutoTranslate stopped working. Messages in channels with auto-translate enabled are not being translated.
Server logs show the following error when messages are received in a channel with auto-translate enabled:
{"level":50,"name":"System","msg":"Error translating message attachment","err":{"type":"Error","message":"Forbidden","stack":"Error: Forbidden\n at DeeplAutoTranslate._translateAttachmentDescriptions (app/autotranslate/server/deeplTranslate.ts:203:12)\n at processTicksAndRejections (node:internal/process/task_queues:103:5)\n at Immediate. (app/autotranslate/server/autotranslate.ts:327:28)"}}
Possible root cause (hypothesis): The bundled code shows that _translateMessage and _translateAttachmentDescriptions use different DeepL authentication methods. _translateMessage uses the current format (Authorization: DeepL-Auth-Key header), while _translateAttachmentDescriptions uses the deprecated format (auth_key as a query parameter with no Authorization header). DeepL no longer accepts the auth_key query parameter and returns HTTP 403 Forbidden for such requests. It is possible this inconsistency affects the overall translation flow.
This can be verified independently:
# Returns 403 — old format used by _translateAttachmentDescriptions
curl -X POST "https://api.deepl.com/v2/translate?auth_key=YOUR_KEY" -d "text=Hello&target_lang=EN"
# Returns 200 — new format used by _translateMessage
curl -X POST "https://api.deepl.com/v2/translate" \
-H "Authorization: DeepL-Auth-Key YOUR_KEY" \
-d "text=Hello&target_lang=EN"
Steps to reproduce:
1. Go to Admin → Settings → Message → Auto Translate
2. Enable Auto Translate, select DeepL as provider, enter a valid DeepL API key
3. Enable auto-translate in any channel
4. Post or receive a message in that channel
Expected behavior:
Messages are automatically translated for users who have auto-translate enabled in that channel.
Actual behavior:
Messages are not translated. Server logs show Error: Forbidden originating fromions in deeplTranslate.ts.
Server Setup Information:
- Version of Rocket.Chat Server: 8.5.1
- License Type: Community
- Number of Users: ~50
- Operating System: Linux (Ubuntu 24.04)
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog: Yes
- NodeJS Version: (bundled in container)
- MongoDB Version: 8.2
Description:
After upgrading to Rocket.Chat 8.5.1, DeepL AutoTranslate stopped working. Messages in channels with auto-translate enabled are not being translated.
Server logs show the following error when messages are received in a channel with auto-translate enabled:
{"level":50,"name":"System","msg":"Error translating message attachment","err":{"type":"Error","message":"Forbidden","stack":"Error: Forbidden\n at DeeplAutoTranslate._translateAttachmentDescriptions (app/autotranslate/server/deeplTranslate.ts:203:12)\n at processTicksAndRejections (node:internal/process/task_queues:103:5)\n at Immediate. (app/autotranslate/server/autotranslate.ts:327:28)"}}
Possible root cause (hypothesis): The bundled code shows that
_translateMessageand_translateAttachmentDescriptionsuse different DeepL authentication methods._translateMessageuses the current format (Authorization: DeepL-Auth-Keyheader), while_translateAttachmentDescriptionsuses the deprecated format (auth_keyas a query parameter with no Authorization header). DeepL no longer accepts theauth_keyquery parameter and returns HTTP 403 Forbidden for such requests. It is possible this inconsistency affects the overall translation flow.This can be verified independently: