Exchanges the authorization code for a refresh token and stores the connection for the caller's profile. The state must be the one initiate returned to this user on this server, and the redirect URI and portal are re-checked against the current allowlists. Connecting again replaces the profile's previous connection, and its old grant is revoked at the portal unless another profile still uses it. No token is returned.
Authorization
Internal API clients only, and the user must be a SERVER or COMPANY user.
Responses
-
Created
-
Bad Request -
codemissing,stateinvalid or expired, an allowlist entry was removed, or ArcGIS rejected the code. -
Forbidden - not an internal client, or a BASIC user.
-
Bad Gateway - ArcGIS could not be reached or answered with an error.
-
Service Unavailable - ArcGIS has no client id on this server.
curl \
--request POST 'https://api.iformbuilder.com/exzact/api/v80/[servername]/integrations/arcgis/connection' \
--header "Content-Type: application/json" \
--header "Authorization: Bearer {access_token}" \
--data '{
"code": "string",
"state": "string"
}'
# Headers
Authorization: Bearer {access_token}
# Payload
{
"code": "string",
"state": "string"
}
{
"connected": true,
"username": "jdoe_example",
"portal_url": "https://www.arcgis.com/sharing",
"healthy": true
}
{
"error_message": "string"
}
{
"error_message": "string"
}
{
"error_message": "string"
}
{
"error_message": "string"
}