Custom Token throwing Authentication error

Hi,
I’ve got a script to purge URL on Cloudflare. It works if I use the global API token. I have generated a custom token and with the custom it doesn’t work, throwing “Authentication error”.
Here is how I have it set: Full Screen #335
I’ve tried to give complete access but still, the error appears. And curl test via terminal works fine.

Any suggestion what could be wrong?

Thank you

I suggest you take a look at the code you’re sending. Is there a way to step through in debugging mode, or configure full logging of that script?

well, the code is pretty simple. Not much to debug or log. If it works with global and not with custom, it might be missing something, but what?
Here is the script in PHP/WP: Full Screen #336

Tokens don’t use the same syntax as a Key. I believe it should be just this header:
Authorization: Bearer BLAHBLAH

1 Like

Thank you, this works!

1 Like

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