Skip to content
URL:
https://<root>/generateToken
Methods:
POST
Version Introduced:
12.0

Description

The generateToken operation generates a new token for use with the ArcGIS Video Server REST APIs.

Request parameters

ParameterDetails

username

(Required)

The primary site administrator account's username, or the username of another user.

password

(Required)

The primary site administrator account's password, or the password associated with the provided username.

client

The client type that will be granted access to the token.

ip will allow user input for specific IP Addresses which can utilize the generated token. referer will make the token available for anyone using it against a specific web application. requestip will automatically set the token to work for the generator of said token exclusively.

expiration

This parameter determines how long the created token will be usable in minutes. The default value is 60, or one hour. The maximum value is 525600, or one year.

f

(Required)

The output format for this operation. The default value is html.

Values: html | json | pjson

token

(Required)

Users interacting programmatically with this endpoint must generate a token that must be included as a request parameter. A token can be obtained using the Generate Token operation.

Response properties

PropertyDetails

expires

The expiration time of the generated token.

loginAsPSA

Determines if the token can be utilized to give the same permissions as the primary site administrator. If false, the user will have limited capabilities.

Values: true | false

token

The token generated from this operation. This will allow users to programmatically interact with the other endpoints and operations.

Example usage

The following is a sample POST request for the generateToken operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
POST /arcgis/admin/generateToken HTTP/1.1
Host: organization.example.com:21443
Content-Type: application/x-www-form-urlencoded
Content-Length: []

user=testUser&password="testpassword"&client=ipAddress&f=pjson

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
5
{
    "expires": "expirationDate",
    "loginAsPSA": "< true | false >",
    "token": "tokenId"
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
{
    "expires": 1763392544183,
    "loginAsPSA": true,
    "token": "V4AFFHi4bmO3R6lXzRlshx4cfxyMB3R5H4_pGVRigfN8Il679illfnWrRw4HJxDsOEm5XyyLWRbCXCC10vYuVeFeGpSz7i2i0NLARIW_1nnnDJUWM35ojTeLw_j7tL1d478j2pfQ4Ph9ppSl105jlWHOZaGCbVkzyPMJzYUXsCkjI79NgXtb37O4lw81e2MDsMWnDfppndjT_llKhg1NJK-5LE0LXjMIqv4d4BwctlI."
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.