Arcgis Signin
const url = 'https://example.com/services/arcgis/signin/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"portal_url":"example","username":"example","password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/services/arcgis/signin/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "portal_url": "example", "username": "example", "password": "example" }'Sign in to an ArcGIS portal and return a short-lived token.
Asks the portal’s own token service for a token valid for 60 minutes and
returns it. Put that token in the token field on probe, preview, commit
and refresh; an import that runs longer than the token lives fails with a
credential error and has to start over.
An account that signs in through an identity provider, or that has multifactor authentication turned on, cannot use this. Paste a token or an API key instead. A portal on a private network is unreachable either way.
Authorizations
Section titled “ Authorizations ”Request Body required
Section titled “ Request Body required ”Portal address plus the credentials one generateToken call needs.
No character policy on the two credential fields, deliberately. They are form-encoded into the outbound body, which percent-escapes every value, so neither a control character nor a separator can smuggle a second field into the request the way one can into a header line. The length bounds are here to keep an absurd body from reaching the portal at all.
object
ArcGIS portal URL, for example https://your-org.maps.arcgis.com. The /sharing/rest base is accepted too.
ArcGIS account name to sign in with.
Password for that ArcGIS account.
Example generated
{ "portal_url": "example", "username": "example", "password": "example"}Responses
Section titled “ Responses ”Successful Response
The minted portal token and nothing else about the account.
object
Short-lived ArcGIS portal token. Use it as the token field on probe, preview, commit and refresh.
UTC instant at which the portal stops accepting the token.
Example generated
{ "token": "example", "expires_at": "2026-04-15T12:00:00Z"}Bad request — invalid payload
Unauthorized — missing or invalid credentials
Forbidden — caller lacks write access
Not found
Conflict — resource state prevents the operation
Validation error
Too many requests — retry after the advertised interval
Headers
Section titled “ Headers ”Seconds until the request may be retried
Internal server error
Bad gateway — the ArcGIS portal could not be reached or did not answer with a sign-in response
Service unavailable — the database could not serve the request
Gateway timeout — the ArcGIS portal did not respond in time