capabilities.work

Connect an Account via a New Auth Config

A 4-step recipe with Composio. We can help you get access.

Recipe · 4 steps

Connect an Account via a New Auth Config

Provision an auth config and connect a user account, then wait for it to activate.

  1. Create a new authentication configuration for the toolkit so connected accounts can be opened against it.
  2. Open a connected account for the user against the freshly created auth config, returning the connection id and any redirect needed to finish OAuth.
  3. Poll the connected account until it reports an ACTIVE status, retrying while it remains in an initializing or pending state.
  4. Read the connected account one final time to capture the authoritative active status and the auth toolkit it is bound to.
What you'll need to have ready
  • apiKey: Composio project API key sent in the x-api-key header.
  • toolkitSlug: The toolkit slug to create the auth config for (e.g. "gmail").
  • authType: The auth config type discriminator (e.g. "use_composio_managed_auth").
  • authConfigName: Optional human-friendly name for the new auth config.
  • userId: The end-user identifier the connected account belongs to.
For your developer

Arazzo workflow composio:connect-account-via-auth-config, 4 operations: postAuthConfigs → postConnectedAccounts → getConnectedAccountsByNanoid → getConnectedAccountsByNanoid. Specs on APIs.io.