[ApiError { code: 10000, message: "Authentication error", other: {} }]

Hi, I have just seen the new blog post on Worker sites, so I decided to give it a try, I generated a full-permission API key, and wrangler config’d it, the API key works using the curl command.

I then generated a worker site project using wrangler generate, and then added my account ID to the wrangler.toml

However, when I try to wrangler preview --watch it says Error: [ApiError { code: 10000, message: “Authentication error”, other: {} }]

3 Likes

Oh and yes, I saw the other post with this error, and everyone is saying to log out and log back in. That didn’t work - that issue seemed to be displayed on the Cloudflare dashboard whereas I am seeing it in the CLI

1 Like

Have you added your IP to the exclusion (white) list?

What do you mean? I’m trying to deploy a site to Workers Sites, nothing to do with any of my zones

Have you managed to solve it? I’m also getting the error code 10000 on wrangler when trying to deploy some workers.

Solution for me was to configure wrangler with my Global API Key instead of a key I made with the “Edit Cloudflare Workers” token template.

1 Like

The solution is to use the global API key for your account, instead of the other one

4 Likes

All,

I just decided to set up my first Wrangler Site, and ran into this same error. I disagree with the previous comments; the whole point of API Keys was to prevent handing out the Global API Key to all the developers / machines.

The API Key I created has the following permissions:

 Workers KV Storage:Edit, Workers Scripts:Edit

I added it to my system with wrangler config which asked for the email and the API Key, it did not refer to it as the Global API Key.

I also tried adding

Zone.Zone Settings, Zone.Workers Routes

But no joy. Has anyone had success using API Keys with wrangler and CLI and workers?

I’m getting the same error when I try to get the values of an specif key. 10000: Authentication erro

In resume, what it’s working

  • /user/tokens/verify
  • /accounts/{ACCOUNT_ID}/storage/kv/namespaces/{namespaceId}/keys

what it’s NOT working

  • /accounts/{ACCOUNT_ID}/storage/kv/namespaces/{namespaceId}/values/{key}

PS. this is the base url https://api.cloudflare.com/client/v4

2 Likes