Setting up your domain with Cloudflare API

Back to Dashboard back to Newsy home
You may find the method of setting up your domain via a CNAME a little inconvenient. Instead, you can use Cloudflare API, which provides various domain-related features, which can speed up the domain set up process by automating it.
Cloudflare API Token
We achieve this by first setting up a Cloudflare API token, which can be done in the API Tokens page in your Cloudflare profile page. Click on Create token button and navigate to Get started for Custom Token as shown in below image.
API Token allows Newsy to securely access your Cloudflare account on your behalf. In the custom tokens, we will configure a set of permissions to define exactly what this API token will enable Newsy to do - i.e. Newsy does not require all the permissions. So it's good to specify and allow only the things that Newsy requires to automate the domain set-up process and no need to give permissions that it does not need.
Give your API token an appropriate name and then select permissions as shown in the below screenshot.
Once you have successfully created the API token (as shown below), copy the API token (please note that you copy it and paste it somewhere since Cloudflare does not show the API token again).
In Newsy, click on your username in the top-right hand side of the screen and click on the Account menu. Paste your API token in the field called Cloudflare API token as shown below.
Setting up a new site via Cloudflare
Now click on + New Site and check the box where it says Set this domain up via my Cloudflare account. This will enable Newsy to set up the CNAME, HTTPS and all the necessary page rules for your domain automatically. All you will need to do in the end is change the Nameservers for your domain. Please note that, it could still take up to 48 hours before the DNS changes to take its effect.
Got questions?
Get in touch with us