API ReferenceConnected Accounts

Refresh authentication for a connected account

Markdown
POST
/api/v3/connected_accounts/{nanoid}/refresh

Initiates a new authentication flow for a connected account when credentials have expired or become invalid. This may generate a new authentication URL for OAuth flows or refresh tokens for other auth schemes.

Authorization

ApiKeyAuth
x-api-key<token>

API key authentication

In: header

Path Parameters

nanoid*string

The unique identifier of the connected account

FormatconnectedAccountId

Query Parameters

redirect_url?string

Request Body

application/json

redirect_url?string
validate_credentials?boolean

[EXPERIMENTAL] Whether to validate the provided credentials, validates only for API Key Auth scheme

Defaultfalse

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://backend.composio.dev/api/v3/connected_accounts/con_1a2b3c4d5e6f/refresh" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "con_1a2b3c4d5e6f",
  "status": "ACTIVE",
  "redirect_url": "https://app.example.com/oauth/callback"
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}
{
  "error": {
    "message": "string",
    "code": 0,
    "slug": "string",
    "status": 0,
    "request_id": "string",
    "suggested_fix": "string",
    "errors": [
      "string"
    ]
  }
}