Fortigate - Add an ip address with API
Hi,
I'm trying to add ip addresses to my Fortigate but I'm getting an HTTP Forbidden.
Here are the commands I run:
curl -k -i -X POST https://X.X.X.X/logincheck -d "username=apiuser&secretkey=apiuser" --dump-header header.txt -c cookies.txt
curl -k -i -X POST https://X.X.X.X/api/v2/cmdb/firewall/address -d "{'name':'test','subnet':'1.1.1.1/32' }" -b header.txt
My user apiuser has the profile super_admin.
Do you know why I'm getting an HTTP/1.1 403 Forbidden?
Thank you in advance.
All the best,
Hyjaal
