> For the complete documentation index, see [llms.txt](https://apidocs.zerionsoftware.com/doc/iformbuilder-v81/llms.txt)

# Create ArcGIS Connection

> POST /integrations/arcgis/connection
> 
> 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.



## Servers
- https://api.iformbuilder.com/exzact/api/v81/[servername]: https://api.iformbuilder.com/exzact/api/v81/[servername]


## Authentication methods
- Oauth2


## Parameters
### Headers

- **Authorization** (string)
  e.g. Bearer {access_token}




### Body: application/json (object)

- **code** (string)

- **state** (string)



## Responses
### 201
Created

#### Body: application/json (object)
- **connected** (boolean)

- **username** (string | null)

- **portal_url** (string | null)

- **healthy** (boolean)
  the stored grant still reads the account's content


### 400
Bad Request - `code` missing, `state` invalid or expired, an allowlist entry was removed, or ArcGIS rejected the code.

#### Body: application/json (object)
- **error_message** (string)
  human-readable reason for the failure


### 403
Forbidden - not an internal client, or a BASIC user.

#### Body: application/json (object)
- **error_message** (string)
  human-readable reason for the failure


### 502
Bad Gateway - ArcGIS could not be reached or answered with an error.

#### Body: application/json (object)
- **error_message** (string)
  human-readable reason for the failure


### 503
Service Unavailable - ArcGIS has no client id on this server.

#### Body: application/json (object)
- **error_message** (string)
  human-readable reason for the failure



[Powered by Bump.sh](https://bump.sh)
