Setting a Route’s worker script to “None” via API

For Workes & Pages, what is the name of the domain?

atqrmenus.com

What is the error number?

10000

What is the error message?

{“success”:false,“errors”:[{“code”:10000,“message”:“Authentication error”}]}

What is the issue or error you’re encountering

I am attempting to use X-Auth-Email in the header of the curl because PUT method is not allowed for api Bearer

What steps have you taken to resolve the issue?

Verified that the token has the needed access
Changed “/routes/” to “/filter/” found here Setting a Route's worker script to "None" via API

Screenshot of the error

Are you the superadmin of the account?

Yes, I am the only user on this account. Most recently I tried making an “Account API Token” since the “User API Token” was not working to see if that would work but it had the same results.

I even tried the “Global API Key” which also didn’t work.

Thank you, sorry for the issues you’re encountering.

The 10k error is a permissions error, I took steps to correct that I suspect will not be effective.

Can you try again and check for trailing/leading spaces in the key. If you keep getting the error, can you create an Account ticket and share your ticket number here? You can open an Account ticket here, https://dash.cloudflare.com/?to=/:account/support

Found the fix via the AI bot! #AIforTheWin

curl -X PUT \
  https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/routes/<ROUTE_ID> \
  -H 'Authorization: Bearer <API_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"pattern":"example.com","port":80,"protocol":"http"}'
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.