generateToken-spec
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: Pease read the security considerations in the Mapping APIs and location services guide. If you use this method in your application, it is recommended that you:
Use HTTPS for all requests
Do not store or log user credentials
Consider using a secure configuration for application secrets.
Services reference: /sharing/rest/generateToken
operation.
Request Body
[{"name"=>"f", "value"=>"<enum>", "datatype"=>"string"}, {"name"=>"username", "value"=>"{{username}}", "datatype"=>"string"}, {"name"=>"password", "value"=>"{{password}}", "datatype"=>"string"}, {"name"=>"referer", "value"=>"https://www.mydomain.com", "datatype"=>"string"}, {"name"=>"client", "value"=>"<enum>", "datatype"=>"string"}, {"name"=>"expiration", "value"=>"<integer>", "datatype"=>"string"}, {"name"=>"ip", "value"=>"<ip>", "datatype"=>"string"}]