DeepL Http post problem - depracated API effective March 14th

Hi,
currently I am using a http get request to the free deepl api to translate the weather forecast from open weather.
Now, deepl is depressing get request and requires post requests effective March 14th:

My attempt causes a 403 forbidden error:

Any help would be greatly appreciated.

Regards

Your host/url is different from the example @ https://developers.deepl.com/docs/resources/breaking-changes-change-notices/march-2025-deprecating-get-requests-to-translate-and-authenticating-with-auth_key :

POST /v2/translate HTTP/2 
Host: api.deepl.com
Authorization: DeepL-Auth-Key [yourAuthKey]
User-Agent: YourApp/1.2.3
Content-Length: 45
Content-Type: application/json
{"text":["Hello, world!"],"target_lang":"DE"}

Or, POST requests only get activated as per March 14th?

well, if you follow this link https://developers.deepl.com/docs/api-reference/translate on the webpage referenced above you are redirected to a page containing more information on syntax etc. and also the friendly reminder to use api-free.deepl.com in case you are not a paying subscriber.

As for the date, the way I understand the information is that the GET will become deprecated on March 14th, but POST is already possible.

So, my syntax / usage appears to be correct to you?

Ah, missed that part.
To me, your flowcard appears to be OK, it looks like the card below;
Make sure the line break between your auth-key and Content-type should be created with the Shift+Enter key combi

Unfortunately I can’t test myself, since no creditcards present here.

But, 403 Forbidden means your key is incorrect, or is it possible you’ve exceeded the max API calls? (500.000 character limit / month)
Note: The incorrect (transmitted) key might be a result of a unallowed trailing linebreak

1 Like

solved…
it´s crazy… and quite logical at the same time:

Authorization: DeepL-Auth-Key [yourAuthKey]

Really means “Authorization: DeepL-Auth-Key [yourAuthKey]”, i.e. not everything after “”:" is replaced with the Auth Key, but only [yourAuthKey]…

Oh that’s odd! Good find.
The logical thing (to me) would be to only enter the auth key (assuming the other text is for explanation purposes only. But, “thy should not assume” :stuck_out_tongue_winking_eye: )

But when you look close at the example, it really shows were to put the auth key exactly