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]);