Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to fix Authorization failed? #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RidaAyed
Copy link

With region marked e.g. "Guten Tag"

C-x t txl-translate-region-or-paragraph

Authorization failed. Please supply a valid authkey parameter

(add-to-list 'load-path "~/src/txl.el")
(require 'txl)
(setq txl-languages '(DE . EN-US))
(setq txl-deepl-api-key "my_free_dev_deepl_api_key")
(global-set-key (kbd "C-x t")   'txl-translate-region-or-paragraph)

.

curl -H "Authorization: DeepL-Auth-Key my_free_dev_deepl_api_key" https://api-free.deepl.com/v2/usage

{"character_count":0,"character_limit":500000}

Nice work, thank you

@tmalsburg
Copy link
Owner

You're configuration looks fine to me. Perhaps the free dev key doesn't work for this purpose? Worth checking with DeepL.

@RidaAyed
Copy link
Author

Changing the domain according to their api introduction solved the issue

Excerpt api introduction

...Please note that the API domain is different for each DeepL API plan, so please make sure to use the correct domain.

@tmalsburg
Copy link
Owner

Interesting. I wasn't aware of that. Will have to add something to the documentation. Thanks!

@tmalsburg
Copy link
Owner

I added a new defcustom for the API URL. Please see here and let me know if it works. And sorry: only now I noticed that you had made a PR. In my e-mail program it looked like an issue. Either way, thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants