From 349bde55351e46b251698fa9ab424cce2034ab91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20D=C4=99bi=C5=84ski?= Date: Mon, 20 Oct 2025 14:29:17 +0200 Subject: [PATCH] IBX-10689: Changed authorization method for DeepL to use header authorization method --- src/lib/Client/Deepl.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/Client/Deepl.php b/src/lib/Client/Deepl.php index 0511d6a..c8a4af2 100644 --- a/src/lib/Client/Deepl.php +++ b/src/lib/Client/Deepl.php @@ -61,7 +61,6 @@ public function setConfiguration(array $configuration): void public function translate(string $payload, ?string $from, string $to): string { $parameters = [ - 'auth_key' => $this->authKey, 'target_lang' => $this->normalized($to), 'tag_handling' => 'xml', 'text' => $payload, @@ -77,6 +76,9 @@ public function translate(string $payload, ?string $from, string $to): string [ 'base_uri' => 'https://api.deepl.com', 'timeout' => 5.0, + 'headers' => [ + 'Authorization' => 'DeepL-Auth-Key ' . $this->authKey, + ], ] ); $response = $http->post('/v2/translate', ['form_params' => $parameters]);