0

I'm attempting to send a POST request to DeepL API, and I send my request I receive a 403 Forbidden Error, which says that the request 'is a legal request but the server refuses to respond to it' and I can't figure out why. I will attach the logs below, and if I'm missing any relevant data please let me know.

Request:

POST /v2/translate?text=Hello%20world&target_lang=DE HTTP/1.1

Request Log:

    Request Headers
HOST: api.deepl.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
DeepL-Auth-Key: 243xoxoxooxooxd7
User-Agent: PostmanRuntime/7.28.4
Postman-Token: 80409-486f-8c91-4c300e0d24c1
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 49
Request Body
Response Headers
Server: nginx
Date: Thu, 04 Nov 2021 15:10:47 GMT
Content-Length: 0
Connection: keep-alive
Access-Control-Allow-Origin: *
Response Body
  • 1
    (Disclaimer: I work for DeepL) Hi there, it could be the case that your key is authorized for CAT tool usage only. The API requires an API-specific account—you could create one here if you'd like: https://www.deepl.com/pro#developer (there's a free version available). Let us know if that does the trick, and we're going to see about making that error message more specific while we're at it. – wints Nov 04 '21 at 16:28
  • @speaksgermansortof You were correct in that I needed to open an API account, however I'm still receiving a 403 error, but its working in a cURL request, not sure why. –  Nov 08 '21 at 11:59
  • thanks for letting me know. Does Postman show a DeepL-specific error message in the response body as well? E.g. if I try to call a free API domain with a pro API auth key in Postman, I get a 403 with `"message": "Wrong endpoint. Use https://api.deepl.com"` in the response. – wints Nov 10 '21 at 10:23
  • I know this is old but, if you are experiencing this or similar, try to disable postman default header "Connection=keep-alive", see if that works – BugsOverflow Dec 09 '22 at 15:38

0 Answers0