Closed jamct closed 4 years ago
Hi @jamct,
Thanks for this. Any chance of making this backwards compatible so I don't break existing user's setups? Perhaps checking for the existence of the EMAIL
variable to determine what type of call to make?
good idea.I will add a fix tomorrow.
I added a switch to make it backwards compatible.
Thanks; I'll give this a test tomorrow.
Cloudflare prefers scoped API tokens instead of global API keys (which is deprecated). This PR uses Bearer token login (no E-Mail needed). In API v4 another URL for token verification must be called. The PR also adds a mandatory parameter for creating and updating a record.
To use scoped API token, navigate to cloudflare settings and create a token with the following scopes:
Zone.Zone Settings, Zone.Zone, Zone.DNS