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

Minimum TTL (30) not accepted by Cloudflare API #179

Open
cotton105 opened this issue Feb 7, 2024 · 1 comment
Open

Minimum TTL (30) not accepted by Cloudflare API #179

cotton105 opened this issue Feb 7, 2024 · 1 comment
Assignees

Comments

@cotton105
Copy link

Describe the bug
Setting the TTL in the config to anything below 60 for a non-Enterprise account causes the Cloudflare API request to fail, with error code 9021:

😡 Error sending 'POST' request to 'https://api.cloudflare.com/client/v4/zones/***/dns_records':
{"result":null,"success":false,"errors":[{"code":1004,"message":"DNS Validation Error","error_chain":[{"code":9021,"message":"TTL must be between 60 and 86400 seconds, or 1 for Automatic."}]}],"messages":[]}

To Reproduce
Steps to reproduce the behavior:

  1. Change the ttl option in config.json to 30 (using a non-Enterprise Cloudflare account).
  2. Run python cloudflare-ddns.py --repeat.
  3. See error.

Expected behavior
The TTL option should be set to 1 (auto), instead of continuing to try to use the invalid TTL in a POST request.

Desktop

  • OS: Arch Linux
@QbikEdge
Copy link

This is the expected behavior. Because Cloudflare does not accept less then 60 TTL

see error message TTL must be between 60 and 86400 seconds

also see DNS management view in Cloudflare it start with 1 min:

image

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