# Get connected account details by ID

**Documentation:** /reference/api-reference/connected-accounts/getConnectedAccountsByNanoid

Retrieves comprehensive details of a connected account, including authentication configuration, connection status, and all parameters needed for API requests.

---

## GET `/api/v3/connected_accounts/{nanoid}`

**Endpoint:** `https://backend.composio.dev/api/v3/connected_accounts/{nanoid}`

**Summary:** Get connected account details by ID

Retrieves comprehensive details of a connected account, including authentication configuration, connection status, and all parameters needed for API requests.

### Authentication

**ApiKeyAuth** - API Key in `header` header `x-api-key` OR **UserApiKeyAuth** - API Key in `header` header `x-user-api-key`

### Path Parameters

- `nanoid` (string (connectedAccountId)) *(required)*: The unique identifier (nanoid) of the connected account

### Responses

#### 200 - Successfully retrieved connected account details with all authentication parameters and connection status

**Response Schema:**

- `toolkit` (object) *(required)*
  - `slug` (string) *(required)*: The slug of the toolkit
- `auth_config` (object) *(required)*
  - `id` (string (authConfigId)) *(required)*: The id of the auth config
  - `auth_scheme` (enum: "OAUTH2" | "OAUTH1" | "API_KEY" | ...) *(required)*: the authScheme is part of the connection state use it there
  - `is_composio_managed` (boolean) *(required)*: Whether the auth config is managed by Composio
  - `is_disabled` (boolean) *(required)*: Whether the auth config is disabled
  - `deprecated` (object)
    - `uuid` (string (uuid)) *(required)*: The uuid of the auth config
- `id` (string (connectedAccountId)) *(required)*: The id of the connection
- `user_id` (string) *(required)*: This is deprecated, we will not be providing userId from this api anymore, you will only be able to read via userId not get it back
- `status` (enum: "INITIALIZING" | "INITIATED" | "ACTIVE" | ...) *(required)*: The status of the connection
- `created_at` (string) *(required)*: The created at of the connection
- `updated_at` (string) *(required)*: The updated at of the connection
- `state` (object) *(required)*: The state of the connection
  - `authScheme` (enum: "OAUTH1" | "OAUTH2" | "API_KEY" | ...) *(required)*
  - `val` (object) *(required)*
    - `subdomain` (string)
    - `your-domain` (string)
    - `region` (string)
    - `shop` (string)
    - `account_url` (string)
    - `COMPANYDOMAIN` (string)
    - `extension` (string)
    - `form_api_base_url` (string)
    - `instanceEndpoint` (string)
    - `api_url` (string)
    - `borneo_dashboard_url` (string)
    - `proxy_username` (string)
    - `proxy_password` (string)
    - `domain` (string)
    - `version` (string)
    - `dc` (string)
    - `site_name` (string)
    - `instanceName` (string)
    - `account_id` (string)
    - `your_server` (string)
    - `server_location` (string)
    - `base_url` (string)
    - `status` (enum: "INITIALIZING" | "INITIATED" | "ACTIVE" | ...) *(required)*
    - `oauth_token` (string)
    - `authUri` (string)
    - `oauth_token_secret` (string)
    - `redirectUrl` (string)
    - `callbackUrl` (string)
    - `oauth_verifier` (string)
    - `consumer_key` (string)
    - `callback_url` (string)
    - `error` (string)
    - `error_description` (string)
    - `expired_at` (string)
- `data` (object) *(required)*: This is deprecated, use `state` instead
  - `[key: string]` (any)
- `status_reason` (string,null) *(required)*: The reason the connection status changed. Possible reasons: Connection initiation did not complete within 10 minutes, Permanent auth error during token refresh, Max auth failures reached, OAuth callback failed during token exchange, Connection status updated by user, Auth config is disabled
- `is_disabled` (boolean) *(required)*: Whether the connection is disabled
- `test_request_endpoint` (string): The endpoint to make test request for verification
- `deprecated` (object)
  - `labels` (array<string>) *(required)*: The labels of the connection
  - `uuid` (string (uuid)) *(required)*: The uuid of the connection
- `params` (object) *(required)*: The initialization data of the connection, including configuration parameters
  - `[key: string]` (any)

**Example Response:**

```json
{
  "toolkit": {
    "slug": "string"
  },
  "auth_config": {
    "id": "string",
    "auth_scheme": "OAUTH2",
    "is_composio_managed": true,
    "is_disabled": true,
    "deprecated": {
      "uuid": "550e8400-e29b-41d4-a716-446655440000"
    }
  },
  "id": "string",
  "user_id": "string",
  "status": "INITIALIZING",
  "created_at": "string",
  "updated_at": "string",
  "state": {
    "authScheme": "OAUTH1",
    "val": {
      "subdomain": "string",
      "your-domain": "string",
      "region": "string",
      "shop": "string",
      "account_url": "string",
      "COMPANYDOMAIN": "string",
      "extension": "string",
      "form_api_base_url": "string",
      "instanceEndpoint": "string",
      "api_url": "string",
      "borneo_dashboard_url": "string",
      "proxy_username": "string",
      "proxy_password": "string",
      "domain": "string",
      "version": "string",
      "dc": "string",
      "site_name": "string",
      "instanceName": "string",
      "account_id": "string",
      "your_server": "string",
      "server_location": "string",
      "base_url": "string",
      "status": "INITIALIZING",
      "oauth_token": "string",
      "authUri": "string",
      "oauth_token_secret": "string",
      "redirectUrl": "string",
      "callbackUrl": "string",
      "oauth_verifier": "string",
      "consumer_key": "string",
      "callback_url": "string",
      "error": "string",
      "error_description": "string",
      "expired_at": "string"
    }
  },
  "data": {
    "key": null
  },
  "status_reason": null,
  "is_disabled": true,
  "test_request_endpoint": "string",
  "deprecated": {
    "labels": [
      "string"
    ],
    "uuid": "550e8400-e29b-41d4-a716-446655440000"
  },
  "params": {
    "key": null
  }
}
```

#### 400 - Bad request - Invalid nanoid format or other validation error

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 401 - Unauthorized - Authentication failed

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 403 - Forbidden - Insufficient permissions to access this connected account

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 404 - Not found - Connected account does not exist or was deleted

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 500 - Internal server error - Failed to retrieve connected account details

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 501 - Not implemented - This operation is not supported for the requested connected account or authentication scheme

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

### Example cURL Request

```bash
curl -X GET "https://backend.composio.dev/api/v3/connected_accounts/string" \
  -H "x-api-key: YOUR_API_KEY"
```