Connected Accounts
Connected accounts are authenticated connections between your users and toolkits. After users authenticate (see Authenticating tools), you can manage these accounts throughout their lifecycle.
Composio automatically handles token refresh and credential management. This guide covers manual operations: listing, retrieving, refreshing, enabling, disabling, and deleting accounts.
List accounts
Retrieve all connected accounts with optional filters:
Get account details
Retrieve a connected account by ID:
Get account credentials
Get account credentials for use with your own tools:
Refresh credentials
Manually refresh credentials for a connected account:
Enable and disable accounts
Change account status without deleting. Set to INACTIVE to pause access, or ACTIVE to restore. Useful for:
- Pausing access during subscription lapses
- Temporary disconnection
INACTIVE accounts cannot execute tools. Tool execution will fail until the status is changed.
Delete accounts
Permanently remove a connected account and revoke all credentials:
Deletion is permanent. Users must re-authenticate to reconnect.
Multiple accounts
Users can connect multiple accounts for the same toolkit (e.g., personal and work Gmail).
Use link() for creating accounts, as it provides hosted authentication and allows multiple accounts by default. See Connect Link authentication.
Execute with a specific account
When you have multiple accounts, specify which one to use with connected_account_id: