API Authentication
Last modified: Thursday July 03, 2025.
All requests to the API require an authentication cookie.
Add an authentication user
The cookie request requires authentication with a username and password.
You can use any username and password for a user of the deployment, however, it is recommended you create a bespoke user, role, and user group to authenticate the calls for each API integration.
- Give the authentication user only the necessary permissions required for your integration, such as Arm/disarm alarm zones, View live video, Share video, and so on.
- Do not hard-code the username and password of the user. Either read them from a configuration file, or prompt the user for credentials.
- For more information on users, roles, and permissions, see Manage Protect users.
Request an authentication cookie
You need to generate an authentication cookie to pass with your API requests.
- The cookie is obtained by sending an HTTP POST request to:https://<deployment name>.<region>.alta.avigilon.com/api/v1/dologin
- The body must include the JSON: {"username":"<username>","password":"<password>"}
- The username and password are the email and password used by a user to log into the platform.
- For best practice, use a bespoke user account. See Add an authentication user above.
- The authentication cookie is in the request response.
Get an authentication cookie from a Windows Command Prompt
- On a Windows PC, open a Command Prompt. 
- Enter: - curl -v ^
 -H "Content-Type: application/json" ^
 -d "{\"username\":\"<username>\",\"password\":\"<password>\"}" ^
 https://<deployment name>.<region>.alta.avigilon.com/api/v1/dologin- Leave out the ^carets if you enter the command in one line.
- Escape the internal double quotes around the JSON name/value pairs with backslashes: \"
 
- Leave out the 
- You can see the cookie in the response, for example: - Set-Cookie: va=eyJzdWIiOiTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoIxMjM0NxNTE2MjM5MDIyLCJleHAiOjE2NDU3NjY0MDB9
Store and use an authentication cookie from a Windows Command Prompt
You can store the cookie locally and use it to authenticate subsequent command prompt or scripted API requests:
- On a Windows PC, run a Command Prompt from the folder where you want to store the cookie. - To do this quickly, click the blank space next to the required folder's path in the Windows Explorer address bar and enter cmd.
 
- To do this quickly, click the blank space next to the required folder's path in the Windows Explorer address bar and enter 
- Enter: - curl -v ^
 -c cookies.txt ^
 -H "Content-Type: application/json" ^
 -d "{\"username\":\"<username>\",\"password\":\"<password>\"}" ^
 https://<deployment name>.<region>.alta.avigilon.com/api/v1/dologin- Leave out the ^carets if you enter the command in one line.
- Escape the internal double quotes around the JSON name/value pairs with backslashes: \"
 
- Leave out the 
- The response shows that the cookie is saved: - Added Cookie: va=<your authentication cookie>
- Use the - -boption in subsequent requests to use the stored cookie for authentication. For example, to return a list of zones, enter:- curl -b cookies.txt ^
 https://<deployment name>.<region>.alta.avigilon.com/api/v1/alarmZones
Get an authentication cookie using Postman
- Download and install Postman.
- Click New and selectHTTP .
- In the address bar, set the method to POST and enter the authentication URL for the deployment:https://<deployment name>.<region>.alta.avigilon.com/api/v1/dologin
- Open the Headers tab and set theContent-Type toapplication/json .
- Open the Body tab and selectraw and set the type asJSON from the dropdown.
- Enter the username and password as the payload: {"username":"<username>","password":"<password>"}
- Click SEND .
- If the authentication is successful, the response is 200 OK .
- Click the Cookies tab.
- Your authentication cookie has the name va. Use itsvalue in subsequent API requests.- By default, Postman stores the cookie and uses it in subsequent requests. You can see it in the request Headers tab as aCookie .
 
- By default, Postman stores the cookie and uses it in subsequent requests. You can see it in the request