Which API Permission to use to whitelist IP?

HI, I’m trying to access the following endpoint via API


But I don’t know which permission grant to the token. I tried Zone>Zone WAF but i receive an Authentication error when I try to execute the following call

curl -X POST "https://api.cloudflare.com/client/v4/zones/my_zone_id/firewall/access_rules/rules" -H "Authorization: Bearer my_token" -H "Content-Type:application/json"  -d '{"mode":"whitelist","configuration":{"target":"ip","value":""},"notes":"Whitelist Request test"}'

Can you try adding “Zone → Zone → Edit” and “Zone → Firewall Services → Edit”?


It works. Thank you very much.

Bye, Francesco

1 Like

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