Wrangler Authentication Error

Hi, I’ve been using Workers for a few months, I use to successfully push my changes to the live site, but today, I’m getting this error, nothing has changed from my side, not sure why I’m getting this error.

Error: [ApiError { code: 10000, message: “Authentication error”, other: {} }]

I’ve validated my account ID and Zone ID, It was working till yesterday, not sure what happened today.

I’m using unlimited workers plan, is there any way to debug it and fix it?

[email protected]:~/projects/home-app$ wrangler publish --env production
Error: [ApiError { code: 10000, message: "Authentication error", other: {} }]


1 Like

is this error still live?

Yes, it is. And this is also reproduced everywhere Github Action cloudflare/wrangler-action.
The stderr make Github handle the action failed even if succeeded.

Hi, I’m experiencing the exact same issue when I execute the following command:

wrangler publish --env staging


 Built successfully, built project size is 13 KiB.
 Using namespace for Workers Site "__xxx-workers_sites_assets"
 Uploading site files
Error:  Code 10000: Authentication error

I’ve tried using the Global API Key and it works, but it shouldn’t be that way.

As a note, any other command works (preview, secret, …), but not publish.

Any help would be appreciated. Thanks in advance.

Sorry for the second reply but I’ve identified the cause of the problem (at least for me).

In the API Tokens section I had an API token created from the template Edit Cloudflare Workers and as far as I remember I didn’t tweak any option, so the Zone Resources section looked like this:

After digging around, I’ve realized that the API token wasn’t attached to any zone, so I assigned all zones from my account and now wrangler publish is working as expected.

@this.zubair, @dev9 I don’t know if your API Token configuration looks like mine, but maybe that’s the cause of your problem.