Repository navigation
Replies: 1 comment
|
Cloudflare removed the old service key style auth; API calls that still send Fix direction:
Until the contrib file is updated upstream, a local copy of the recipe with token auth is the usual workaround. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Deployer Version:
masterat c08d136; the same code is in v8.0.5.Target OS: any (Cloudflare API side change, not OS specific)
PHP version: any (not PHP version specific)
Steps to reproduce
deploy:cloudflarerecipe withcloudflare.service_key(pluszone_idordomain).deploy:cloudflare.Cloudflare removed Service Key authentication on September 30, 2026. From the Cloudflare API deprecations page, entry "Service Key Authentication", deprecation date March 19, 2026, End of life date September 30, 2026 (source):
with deprecated behavior "Authenticating API requests using the X-Auth-User-Service-Key header" and replacement "Create an API Token with the appropriate permissions for your use case."
In
contrib/cloudflare.php:service_keyis checked first and wins over the other options, so a config with a leftoverservice_keysends onlyX-Auth-User-Service-Key, even ifapi_tokenis also set.purge_cacheresponse is not inspected (only curl transport errors throw), so withzone_idset the task finishes as if the purge worked. With onlydomainset, the zone lookup would fail with "Problem with zone data".service_key, and the error at line 43 says "Set a service key or email / api key".I have not run this against the live API; this is from reading the recipe against the Cloudflare change above.
Suggested change
service_keybranch, or make it throw a clear message such as "Cloudflare removed service keys on 2026-09-30, use api_token".api_token.successis false, so a failed purge is visible in the deploy log.I found this with a small scanner I'm building that checks public repos against upcoming platform deadlines (https://otisz.hu/api-sunset/). No sales pitch: happy to open a PR if you want one.
Ottó Misák
All reactions