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

Missing API token results in unintuitve error message #72

Closed
tombh opened this issue Jan 2, 2024 · 5 comments
Closed

Missing API token results in unintuitve error message #72

tombh opened this issue Jan 2, 2024 · 5 comments

Comments

@tombh
Copy link

tombh commented Jan 2, 2024

For some reason my Caddy wasn't picking up ENV variables. So when the DNS challenge was made I got this error message: solving challenges: presenting for challenge: adding temporary record for zone \"mydomain.com.\": got error status: HTTP 400: [{Code:6003 Message:Invalid request headers}]. At first that made me think that Cloudflare's API had been updated to require a different header or something. But in fact it was just that it was probably sending an empty API token.

It's not a big deal, happy to see this closed immediately. The main thing is that the error message is searchable, and might save somebody 5 minutes of head scratching.

@tombh
Copy link
Author

tombh commented Jan 2, 2024

Duplicate of #27

@tombh tombh closed this as completed Jan 2, 2024
@mholt
Copy link
Contributor

mholt commented Jan 10, 2024

Thanks; maybe we should add this to the README 🙃 Since Cloudflare hasn't improved the error message.

@Breinich
Copy link

if caddy environ echoes correctly my api token, can the problem be that caddy sends empty api token?

@mholt
Copy link
Contributor

mholt commented May 14, 2024

If your API token is showing up in caddy environ then it's available to Caddy, but your configuration needs to be such that it is used.

@Breinich
Copy link

Breinich commented May 14, 2024

It is, I suppose, you can see it here: https://caddy.community/t/using-caddy-with-cloudflare-dns/23833

Solution: in fact with caddy command the API token was available, for the caddy named user, it wasn't (because I'm running caddy as a systemd service)

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

No branches or pull requests

3 participants