Install and configure the Cloudflare module
To install the Cloudflare module:
Log in as Administrator.
Navigate to Modules → select Cloudflare → click Install.
Get registered with Cloudflare Partner program. To do so, follow the link and fill out the sign-up form. The confirmation of your registration may take several days. After that generate the API-token which you will need at Step 6.
Navigate to Modules.
Click Settings.
Specify the generated token in the Api Token field.
Cloudflare settings
Click Save.
If a token is specified under the Administrator, all users will use this token.
In order for users to use their own tokens, you need to leave the Api Token field empty in the plugin settings.
Generating Api Token
To create an Api Token in Cloudflare, you need to create an account. If you already have an account, you need to log in.
Create an account and log in to Cloudflare.
Click My Profile.
Select the tab API Tokens.
In the form that opens, click on Create Token.
At the bottom of the templates list, click Get Started opposite Create Custom Token.
Set the token name in the field Token name and add the necessary permissions.
Example of setting a token
After adding the necessary settings, click Continue to summary at the bottom.
The form will open with a description of all the added permissions for the token.
Example of token permissions
If everything is correct, click Create Token, otherwise click Edit token and add permissions.
After clicking on the Create Token button, a page with a ready-to-use token will open.
an example of a ready-to-use token
Permissions
For the correct work of the Cloudflare plugin, select the following permissions:
Account, Account Firewall Access Rules, Read
Zone, Cache Rules, Edit
Zone, Zone Settings, Read, Edit
Zone, Zone DNS, Read, Edit
Zone, Zone, Edit
Zone, Cache Purge, Purge
Zone, Firewall Services, Read, Edit
After adding the necessary permissions, the plugin functions should work. It may take some time to update the token data on Cloudflare servers.