1.4 KiB
1.4 KiB
Get Your Cloudflare Global API Key
The current API key in your .env file is not authenticating correctly. Follow these steps:
Option 1: Get Global API Key (Current Method)
- Go to: https://dash.cloudflare.com/profile/api-tokens
- Scroll down to API Keys section
- Click View next to Global API Key
- Enter your Cloudflare password
- Copy the Global API Key (40 characters, alphanumeric)
- Update
.env:CLOUDFLARE_API_KEY="your-global-api-key-here" CLOUDFLARE_EMAIL="theoracle@defi-oracle.io"
Option 2: Create API Token (Recommended - More Secure)
- Go to: https://dash.cloudflare.com/profile/api-tokens
- Click Create Token
- Click Edit zone DNS template OR create Custom token with:
- Permissions:
- Zone → DNS → Edit
- Account → Cloudflare Tunnel → Edit
- Zone Resources: Include → Specific zone →
d-bis.org - Account Resources: Include → Specific account → Your account
- Permissions:
- Click Continue to summary → Create Token
- Copy the token immediately (you won't see it again!)
- Update
.env:CLOUDFLARE_API_TOKEN="your-api-token-here" # Comment out or remove CLOUDFLARE_API_KEY and CLOUDFLARE_EMAIL
Verify Your API Key
After updating, test with:
./scripts/test-cloudflare-api.sh
You should see: ✓ API Key works! Email: theoracle@defi-oracle.io