Fortinet Document Library

Version:


Table of Contents

Download PDF
Copy Link

Curl examples (Linux)

Get access token

The following shows how to get an access token.

curl -X POST https://ftc.fortinet.com:9696/api/v1/login -H "Content-Type: application/json" -d "{\"client_id\": \"c8585630**************81b7485\", \"client_secret\": \"************************************Wl3w==\"}" --insecure
Create user with access token

The following shows how to create a user with the access token.

curl -X POST https://ftc.fortinet.com:9696/api/v1/user -H "Content-Type: application/json" -H "Authorization: Bearer eyJ0eXAi**********************************************************01Q6to" -d "{\"username\": \"ftc_webapp_user_1\", \"email\": \"***@gmail.com\"}" –insecure

Curl examples (Linux)

Get access token

The following shows how to get an access token.

curl -X POST https://ftc.fortinet.com:9696/api/v1/login -H "Content-Type: application/json" -d "{\"client_id\": \"c8585630**************81b7485\", \"client_secret\": \"************************************Wl3w==\"}" --insecure
Create user with access token

The following shows how to create a user with the access token.

curl -X POST https://ftc.fortinet.com:9696/api/v1/user -H "Content-Type: application/json" -H "Authorization: Bearer eyJ0eXAi**********************************************************01Q6to" -d "{\"username\": \"ftc_webapp_user_1\", \"email\": \"***@gmail.com\"}" –insecure