Get access token

POST https://www.arcgis.com/sharing/rest/generateToken

Using the generateToken REST API endpoint, you can get an access token by sending the username and password directly.

Warning: please read the guide and the security considerations

More: API reference for the /sharing/rest/generateToken operation.

Request Body

[{"name"=>"f", "value"=>"json", "datatype"=>"string"}, {"name"=>"username", "value"=>"{{username}}", "datatype"=>"string"}, {"name"=>"password", "value"=>"{{password}}", "datatype"=>"string"}, {"name"=>"referer", "value"=>"arcgis.com", "datatype"=>"string"}, {"name"=>"client", "value"=>"referer", "datatype"=>"string"}, {"name"=>"expiration", "value"=>"120", "datatype"=>"number"}]

RESPONSES

status: OK

{"sample_token":"NbrSwuJf628eYyUe5CsFwUedqOpbxp70wy3sjtsbF9LW_bA_0cj87rVzeIO5-yMEXVsigf8-zVNiA-4Sd-LQZjXRM6JcSXNlO9NSio1sOK1nwCfkERTSt3O3ww-prrt5en11SEuum_bOvLApvUu2CNoKlFg0cXGuUtIbSIbn8vU.","expires":1631271751263,"ssl":true}