- URL:
- https://<root>/generateToken
- Methods:
POST- Version Introduced:
- 12.1
Description
The generate operation generates a token that can be used by clients when working with the ArcGIS Velocity Administrator API.
Request parameters
| Parameter | Details |
|---|---|
(Required) | The Primary Site Administrator (PSA) account username. Example: |
(Required) | The Primary Site Administrator (PSA) account password. Example: |
(Optional) | The client identification type for which the token is to be generated. Users can specify whether the token will be generated for a client application's base URL, a user-specified IP address, or the IP address that is making the request. Values: |
(Optional) (Required if | The base URL of the web app that will invoke the request to access a secured resource. This parameter must be specified if the value of the Example: |
(Optional) (Required if | The IP address of the machine that will invoke the request to access a secured resource. This parameter must be specified if the value of the Example: |
| The token expiration time in minutes. The default is 60 minutes (one hour). The maximum value of the expiration time is controlled by the server. Requests for an expiration time greater than this maximum will return a token with the maximum allowed expiration time. Applications are responsible for renewing expired tokens; the server rejects expired tokens on subsequent requests. Example: |
(Optional) | The response format. The default response format is Values: |
Example usage
The following is a sample POST request for the generate operation:
POST /<context>/admin/generateToken HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
username=velocityPsaAccount&password=test1234&client=referer&referer=https://organization.example.com&expiration=60&f=pjsonJSON Response example
{
"expires": 1785527948400,
"loginAsPSA": true,
"token": "fBLBp14_l2KnJc9QHGagjar85njaDryK2QX7Pzeuu-1dFHcyOK9FG yWR3S4_4FmcgCrd7o31uJZXOnu5oC0RG9kae65KX2KSZcjk0nfaxxEUML6d_rji8Ybyu6ISxBbwbXSkF5jIIDyKeciGy-tI9d4ga74rOdJ7ZrTJZTzqA."
}