Unable to Authenticate request with 10001 error code
In workers for platform I can't delete my worker anymore.
The same code stopped working 😦
I double checked the api key, account Id, email, verified the token. same for rest or js sdk.
I'm wondering if the permission have changed or something similar.
Please help
9 Replies
10001 in workers doesn't mean auth issue, it means content-type issue
1000 iirc is auth issue
which are you actually getting? and what does the response say?
I'm currently try other apis endpoints too.
All return the same error.
example
or

the key is invalid it looks like
that's for api tokens, did you pass an api token in the key header?
if you're using an api token, you need to use
Authorization: Bearer $API_TOKEN
I'll try
I got it working but this is definitely a breaking change.
My old code which stopped working looks like this.
no matter what combination of
new Cloudflare
, with apiKey, or apiToken, with or without email returns the same 10001 error.
But using curl I got it working with this
did you update the sdk?
if so, i'd suggest trying the older version
if not, then you must be passing in different values.
I only updated
vars are in my .dev.var file.
I really don't know.
The cloudflare sdk has not changed since a month.
let me try to reverse wrangler (should be unrelated)
I found the cause.
Yesterday updated my wrangler.json
from
to
I double checked. Ran both version.
Is this the expected behaviour?
Compatibility date will not change API behaviour
Where is wrangler.json even coming into this? Are you running this as part of a worker?
Yes the code runs locally using
wrangler dev
and within the worker I call the cloudflare api to delete via worker for platforms.