0

I am trying to create a glossary using DeepL's api.

This is DeepL's api for creating glossaries: https://www.deepl.com/en/docs-api/managing-glossaries/

Under the documentation, I should be able to set an authorization header, and send a body of texts to be added to a glossary.

I am still using postman as I am probing my possibilities, but can't get it to work. I get met with a "Invalid or missing Authorization header" response. I am able to use my authorization key to do normal translation, but not glossary creation. (I have pro account)

I tried:

  • Sending a POST request at https://api.deepl.com/v2/glossaries
  • Adding an API key under authorization, setting the key to "DeepL-Auth-Key" and the value to my API key
  • Adding a auth_key query containing my authorization key
  • Add a body just as the example was given

Am I missing something? If my body was bad I'd be getting another error, but am currently clueless since there weren't many questions in regards to this.

  • not sure if of use but using a .NET API this is what I see: Method: POST, RequestUri: 'https://api.deepl.com/v2/glossaries', Version: 1.1, Content: DeepL.Internal.LargeFormUrlEncodedContent, Headers: { User-Agent: deepl-dotnet/1.0.4 Authorization: DeepL-Auth-Key xxxx Content-Type: application/x-www-form-urlencoded } – Boeryepes Mar 20 '22 at 12:14
  • One idea: the HTTP request that DeepL needs should contain a header: `Authorization: DeepL-Auth-Key XXX` where `XXX` is the auth key (i.e. the header has name/key `Authorization` and value `DeepL-Auth-Key XXX`) A header like `DeepL-Auth-Key: XXX` wouldn't work in this case. Another thing: the `auth_key` parameter works for older API functions like text translations, but not for newer API functions like the glossaries (and admittedly this is not obvious from our documentation). – wints Mar 24 '22 at 09:05

0 Answers0