Articles in this section

In Plesk, connecting to Cloudflare in the extension "DNS Integration for Cloudflare®" with API token from delegated account fails: The Token is invalid. Provide a valid CloudFlare API token

Plesk for Windows Plesk for Linux kb: technical

Symptoms

On a Plesk server, connecting to Cloudflare in the extension "DNS Integration for Cloudflare®" fails:

The Token is invalid. Provide a valid CloudFlare API token.

The token with which such error occurs is created in Cloudflare as follows: in Cloudflare account, create the API Token in My Profile > Manage Account > Account API Tokens > Create Token > Create Custom Token with the following parameters:

  • Token name: test_token.
  • Permissions: Zone:Zone:Edit, Zone:DNS:Edit.
  • Zone Resources: "Include:All zones from account:john.doe@example.com's Account".

Original instructions

When the token is created using these steps:

Login to the CloudFlare
Create the API Token (My Profile > Manage Account > Account API Tokens > Create Token > Create Custom Token)

Specify:
Token name: test_token
Permissions: Zone:Zone:Edit
Permissions: Zone:DNS:Edit
Zone Resources: Include:All zones from account:test@plesk.com's Account

Click "Continue to summary" and you will see the message:
This API token will affect the below accounts and zones, along with their respective permissions:
|__ test@plesk.com's Account
|__ All zones - Zone:Edit, DNS:Edit
Click "Create Token"

Cause

Different verification method of API keys on the Cloudflare side depending on the account type (regular and delegated).

Resolution

Create the API token in Cloudflare using these steps:

  1. Log in to your account on Cloudflare.

  2. Go to My Profile > API Tokens.

  3. Click Create Token, and then click Create Custom Token.

  4. Specify parameters of the token:

    • Permissions Zone:Zone:Edit and Zone:DNS:Edit.
    • Zone Resources: Include:All zones from an account:john.doe@example.com (Specify the account that was delegated).
Was this article helpful?

Comments

1 comment
Date Votes

Please sign in to leave a comment.