Fortinet black logo

Setting up an authenticated session

Setting up an authenticated session

To establish a valid authentication session, you must make a POST request to the FortiVoice login handler with your admin username and password. The POST request should contain JSON data with ‘name’ and ‘password’ fields:

URL: http(s)://host_or_ip/api/v1/VoiceadminLogin/

Method: POST

JSON: {“name”: “admin”, “password”: “****”}

Example:

curl -k -v -H "Content-Type: application/json" -X POST -d '{"name":"admin","password":"1111"}'

https://host_or_ip/api/v1/VoiceadminLogin -c cookie.txt

If the login request is successful, the response will contain the authorization token in the APSCOOKIE cookie value. This cookie value must be included in any further requests. The cookie expires with the session.

Note: The permissions for the administrative account you use will affect which objects and operations you shall have access to. Make sure the user has the permissions required for the actions you wish to perform.

Setting up an authenticated session

To establish a valid authentication session, you must make a POST request to the FortiVoice login handler with your admin username and password. The POST request should contain JSON data with ‘name’ and ‘password’ fields:

URL: http(s)://host_or_ip/api/v1/VoiceadminLogin/

Method: POST

JSON: {“name”: “admin”, “password”: “****”}

Example:

curl -k -v -H "Content-Type: application/json" -X POST -d '{"name":"admin","password":"1111"}'

https://host_or_ip/api/v1/VoiceadminLogin -c cookie.txt

If the login request is successful, the response will contain the authorization token in the APSCOOKIE cookie value. This cookie value must be included in any further requests. The cookie expires with the session.

Note: The permissions for the administrative account you use will affect which objects and operations you shall have access to. Make sure the user has the permissions required for the actions you wish to perform.