Get token | ❗ Discouraged
POST https://www.arcgis.com/sharing/rest/generateToken
⚠️ We discourage it's use mainly when the token that is going to be generated is not going to authenticate against an organization that the developer owns.
https://developers.arcgis.com/rest/users-groups-and-items/generate-token.htm
https://enterprise.arcgis.com/en/server/latest/administer/windows/about-arcgis-tokens.htm
Note: This token can not be manually revoked
Note: If the user change it's password, all access tokens generated until that moment will be invalidated
Note: This is not the Resource Owner Password Credentials Grant (defined in OAuth 2.0 RFC 6749, section 4.3), where grant_type is REQUIRED and value MUST be set to
password.
Request Body
[{"name"=>"f", "value"=>"json", "datatype"=>"string"}, {"name"=>"username", "value"=>"{{username}}", "datatype"=>"string"}, {"name"=>"password", "value"=>"{{password}}", "datatype"=>"string"}, {"name"=>"referer", "value"=>"https://www.arcgis.com", "datatype"=>"string"}, {"name"=>"expiration", "value"=>"120", "datatype"=>"number"}, {"name"=>"client", "value"=>"referer", "datatype"=>"string"}, {"name"=>"ip", "value"=>"<ip>", "datatype"=>"string"}, {"name"=>"serverURL", "value"=>"<https://myserver.esri.com/arcgis>", "datatype"=>"string"}, {"name"=>"token", "value"=>"<portal_token>", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"token":"NLYfXI9UyTTYgo_e1ywwYaSv0nx25bbEXTCAcPwVLU_7kelfFG38CWb-Fb5xnH74qhJvY8bEDTeOy7dhP9-5KPqVseJ1eYKZlvBkWUtA8oGxGiF2sVncNeM_zuudfFuS8sU73nYw-7qTiQL-FZGksEOK9CsWxwWExv1ySnJQ9nyPn6Q6s0UHzjUYqM06o","expires":1666030543375,"ssl":true}