Shell script is not able to update Zone WAF Rules (Auth Error)

I’ve been working on a shell script that updates my UAM status to active/inactive based on incoming DDoS.

Additionally I was adding a function to enable my Zone WAF Rules, but my shell script is not able to update them, returning “authentication error”.

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

The UAM status update works just fine, though.

Code snippet from the Zone Rules block

  curl --request GET \
    --url https://api.cloudflare.com/client/v4/zones/$cf_zoneid/firewall/rules \
    --header 'Authorization: Bearer $cf_apikey' \
    --header 'Content-Type: application/json'
}

My permission token is set up as the following

brave_hCCTPNMPgJ

Is there anything I am missing?

Thanks in advance for any help!

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