For Workers & Pages, what is the name of the domain?
What is the error number?
10000
What is the error message?
Authentication error [code: 10000]
What is the issue or error youβre encountering
Cannot run wrangler pages deployment tail --format json --project-name $project --environment preview $deploymentUrl
What steps have you taken to resolve the issue?
I have created an API Token with the following permissions:
Permissions
Account > Cloudflare Pages > Read
Account > Workers Tail > Read
Account > Logs > Read
User > Memberships > Read
User > User Details > Read
Zone > Logs > Read
Account > Released
Zone > All zones
This is apparently not enough for me to run:
What are the steps to reproduce the issue?
Run wrangler pages deployment tail --format json --project-name $project --environment preview $deploymentUrl
I get:
β [ERROR] A request to the Cloudflare API (/accounts/$ACCOUNT/pages/projects/$PROJECT/deployments/$ID/tails) failed.
Authentication error [code: 10000]
It looks like you are authenticating Wrangler via a custom API token set in an environment variable.
Please ensure it has the correct permissions for this operation.
Getting User settingsβ¦
The API Token is read from the CLOUDFLARE_API_TOKEN in your environment.
You are logged in with an API Token, associated with the email $EMAIL.
ββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β Account Name β Account ID β
ββββββββββββββββΌβββββββββββββββββββββββββββββββββββ€
β $NAME β $ID β
The API URL listed is not documented (e.g. itβs not Cloudflare API | Pages βΊ Projects βΊ Deployments βΊ History βΊ Logs βΊ Get Deployment Logs). All of those routes only require Pages Read or Pages Write, but that is apparently not enough for this undocumented route.