If you manage your domains DNS records with Cloudflare, having this API enabled will help you update them automatically. This page will help you to get your Account ID and generate an API Token.
Getting Account ID - first way (if you have a domain in your Cloudflare account):
- Log in to the Cloudflare dashboard and select your account and domain.
- On the Overview page (the landing page for your domain), find the API section.
- The API section contains your Account ID. To copy this value select Click to copy.
Getting Account ID - second way (if you don't have a domain in your Cloudflare account):
- Log in to the Cloudflare dashboard and select your account.
- The URL in your browser should have this pattern: https://dash.cloudflare.com/a-very-long-code-which-is-your-account-id
- The code from this URL is your Account ID, just select and copy it.
Generating an API token:
- Go to the Cloudflare API Tokens page: https://dash.cloudflare.com/profile/api-tokens
- Click on Create Token button.
- Next to Create Custom Token click on the Get Started button.
- Give a name to your token and select permissions "Zone > DNS > Edit" and "Zone > Zone > Edit"
- Click on Continue to summary button and then on the Create Token button.
- The generated token should be displayed on your page. To copy this value select Click to copy.