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 you have the permissions required for the actions you wish to perform. Administrator account permissions can be found on the FortiVoice phone system GUI under System > Administrator > Admin Profile.

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 you have the permissions required for the actions you wish to perform. Administrator account permissions can be found on the FortiVoice phone system GUI under System > Administrator > Admin Profile.