Composio · Arazzo Workflow

Composio Refresh a Connected Account

Version 1.0.0

Detect an expired connected account and refresh its authentication, then confirm it is active again.

1 workflow 1 source API 1 provider
View Spec View on GitHub AI AgentsAuthenticationIntegrationMCPSandboxToolsTriggersUnified-APIWebhookArazzoWorkflows

Provider

composio

Workflows

refresh-connected-account
Refresh a non-active connected account and wait for it to recover.
Reads a connected account, branches when its status is not active, calls the refresh endpoint to renew credentials, and polls the account until it reports an active status again.
3 steps inputs: apiKey, connectedAccountId, redirectUrl outputs: refreshRedirectUrl, status
1
readAccount
Read the connected account to determine whether its authentication is still active or needs refreshing.
2
refreshAccount
Trigger an authentication refresh for the connected account, returning a redirect URL if re-authorization is required.
3
pollRecovery
Poll the connected account until its status returns to ACTIVE after the refresh has been triggered.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Composio Refresh a Connected Account
  summary: Detect an expired connected account and refresh its authentication, then confirm it is active again.
  description: >-
    Recovers a connection whose credentials have gone stale. The workflow reads a
    connected account, branches on whether it is still active, triggers an auth
    refresh when it is not, and polls the account until it returns to an active
    status. Every step spells out its request inline so the flow can be read and
    executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: connectedAccountsApi
  url: ../openapi/composio-connected-accounts-api-openapi.yml
  type: openapi
workflows:
- workflowId: refresh-connected-account
  summary: Refresh a non-active connected account and wait for it to recover.
  description: >-
    Reads a connected account, branches when its status is not active, calls the
    refresh endpoint to renew credentials, and polls the account until it reports
    an active status again.
  inputs:
    type: object
    required:
    - apiKey
    - connectedAccountId
    properties:
      apiKey:
        type: string
        description: Composio project API key sent in the x-api-key header.
      connectedAccountId:
        type: string
        description: The id of the connected account to inspect and refresh.
      redirectUrl:
        type: string
        description: Optional URL the user returns to if the refresh requires re-authorization.
  steps:
  - stepId: readAccount
    description: >-
      Read the connected account to determine whether its authentication is
      still active or needs refreshing.
    operationId: getConnectedAccountsByNanoid
    parameters:
    - name: x-api-key
      in: header
      value: $inputs.apiKey
    - name: nanoid
      in: path
      value: $inputs.connectedAccountId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
      statusReason: $response.body#/status_reason
    onSuccess:
    - name: needsRefresh
      type: goto
      stepId: refreshAccount
      criteria:
      - context: $response.body
        condition: $.status != "ACTIVE"
        type: jsonpath
    - name: alreadyActive
      type: end
      criteria:
      - context: $response.body
        condition: $.status == "ACTIVE"
        type: jsonpath
  - stepId: refreshAccount
    description: >-
      Trigger an authentication refresh for the connected account, returning a
      redirect URL if re-authorization is required.
    operationId: postConnectedAccountsByNanoidRefresh
    parameters:
    - name: x-api-key
      in: header
      value: $inputs.apiKey
    - name: nanoid
      in: path
      value: $inputs.connectedAccountId
    requestBody:
      contentType: application/json
      payload:
        redirect_url: $inputs.redirectUrl
        validate_credentials: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
      redirectUrl: $response.body#/redirect_url
  - stepId: pollRecovery
    description: >-
      Poll the connected account until its status returns to ACTIVE after the
      refresh has been triggered.
    operationId: getConnectedAccountsByNanoid
    parameters:
    - name: x-api-key
      in: header
      value: $inputs.apiKey
    - name: nanoid
      in: path
      value: $inputs.connectedAccountId
    successCriteria:
    - condition: $statusCode == 200
    - condition: $response.body#/status == "ACTIVE"
    retryAfter: 3
    retryLimit: 20
    outputs:
      status: $response.body#/status
  outputs:
    refreshRedirectUrl: $steps.refreshAccount.outputs.redirectUrl
    status: $steps.pollRecovery.outputs.status

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/composio-refresh-connected-account-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.