mirror of
https://dev.azure.com/tstanciu94/Connectors/_git/GoDaddyDDNS
synced 2025-06-21 21:51:04 +03:00
Rename the project and integrate it with cloudflare as well #1
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
https://developers.cloudflare.com/api/
ChatGPT:
Yes, Cloudflare does offer an API that allows you to programmatically update DNS records, including A records. This can be useful for automating the process of updating your DNS records when your dynamic IP address changes.
Here's a general overview of the steps you would need to take:
Log in to your Cloudflare account.
Go to "My Profile" and then to the "API Tokens" section.
Create a new API token with the necessary permissions. Make sure it has the required permissions to edit DNS records.
You will need the Zone ID of your domain and the Record ID of the specific A record you want to update. You can find these by making requests to the Cloudflare API or by checking the Cloudflare dashboard.
You can use the Cloudflare API to update the A record with your new IP address. You'll need to send a PUT request to the Cloudflare API endpoint for updating DNS records.
Here is a general example using cURL:
bash
Replace YOUR_ZONE_ID, YOUR_RECORD_ID, YOUR_API_TOKEN, example.com, and NEW_IP with your actual values.
Integrate this API call into your local service that tracks your dynamic IP. Whenever your IP changes, your service can use the Cloudflare API to update the A record automatically.
Make sure to secure your API token, as it grants access to your Cloudflare account. Keep in mind that Cloudflare's API documentation may change, so it's a good idea to refer to the official Cloudflare API documentation for the most up-to-date information: https://developers.cloudflare.com/api