From dd42ae6a7c36ff7d7340a134f039e03173697f0e Mon Sep 17 00:00:00 2001 From: Simon Weidacher Date: Wed, 8 Jan 2025 07:16:43 +0100 Subject: [PATCH] Changes deepl api authentication to Authorization header. https://github.com/lokalise/i18n-ally/issues/1261 --- src/translators/engines/deepl.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/translators/engines/deepl.ts b/src/translators/engines/deepl.ts index 82e754e6..6d92a568 100644 --- a/src/translators/engines/deepl.ts +++ b/src/translators/engines/deepl.ts @@ -26,9 +26,7 @@ deepl.interceptors.request.use((req) => { ? 'https://api-free.deepl.com/v2' : 'https://api.deepl.com/v2' - req.params = { - auth_key: Config.deeplApiKey, - } + req.headers['Authorization'] = `DeepL-Auth-Key ${Config.deeplApiKey}` if (req.method === 'POST' || req.method === 'post') { req.headers['Content-Type'] = 'application/x-www-form-urlencoded'