I’m having trouble with the DeepL API. I’ve set up a free account and exported my API key, but when I run a curl command to translate text, I get no response. Here’s what I’ve tried:
API_KEY=my_secret_key_here
curl -X POST https://api-free.deepl.com/v2/translate \
-H "Content-Type: application/json" \
-H "Authorization: DeepL-Auth-Key $API_KEY" \
-d '{"text": ["Bonjour tout le monde!"], "target_lang": "EN"}'
The command runs without errors, but there’s no output or error message. I’ve double-checked my API key and the endpoint URL.
I also tried adding the -v flag for verbose output, but I still don’t see the translation in the response. The verbose output shows a 403 status code, which might indicate an authorization problem.
Any ideas on what could be causing this or how to troubleshoot further? Thanks for any help!
I’ve faced this exact problem before. The 403 error typically means there’s an authentication issue. First, ensure you’re using the correct API endpoint for your account type (free or pro). Double-check your API key - even a single incorrect character can cause this.
If that doesn’t work, try encoding your API key. Sometimes special characters in the key can cause issues. You can use URL encoding to be safe.
Another thing to check is your account’s translation limit. Free accounts have a monthly cap. If you’ve exceeded it, you’ll get a 403 error.
Lastly, make sure your account is fully activated. Sometimes there’s a delay after registration before the API access is granted. If all else fails, contacting DeepL support is your best bet.
hey mate, sounds like ur having a rough time with that api. have u tried checkin ur account status? sometimes free accounts get blocked if u hit the limit. also, double-check ur api key - typos happen to everyone! if all else fails, try diff translation service, good luck!
I’ve encountered similar issues with DeepL’s API before. Here’s what worked for me:
First, verify your API key is activated. Sometimes there’s a delay after account creation.
Next, try using the ‘curl -i’ flag to see full HTTP headers. This can reveal more about the 403 error.
If that doesn’t help, test with a simpler request. Use just one short word instead of a full sentence. This can rule out issues with special characters or text length.
Lastly, check your account’s usage stats. Even on free plans, there might be unexpected limits or temporary blocks.
If none of these solve it, reaching out to DeepL support directly might be your best bet. They’re usually quite responsive and can check account-specific issues.