Connecting Users Overview
Establishing Secure Connections for User Authorization
After setting up an Integration for an external app, the next step is to enable your individual end-users to authorize Composio to act on their behalf. This process creates a Connection.
It securely stores the user-specific credentials (like OAuth tokens or API keys) obtained during the authorization process. Every authenticated action executed via Composio happens through one of these Connections.
Identifying Your User: The entity_id
A fundamental concept when creating Connections is the entity_id
.
- What: A unique ID that represents your end-user within Composio. Can map to DB/UUID in your app.
- Why: It allows Composio to use the correct credentials for your end-user in multi-tenant scenarios.
- Default: Composio uses the default ID
"default"
. This is suitable only for single-user scripts, personal testing.
You will pass the entity_id
when initiating the connection process using the SDK, typically by first getting an Entity
object:
Initiating a Connection (Conceptual)
The process generally starts by calling initiate_connection
(Python) or initiateConnection
(TS) on the entity
object, providing the integration_id
or app_name
.
The specific steps that follow (handling redirects, waiting for activation, or providing parameters) depend heavily on whether the app uses OAuth or requires user-provided tokens.
Follow the detailed guides for your specific scenario:
Managing Existing Connections
Once connections are established, you can retrieve and manage them using the SDK.
-
List Connections for a User: Get all active connections associated with a specific
entity_id
. -
Get a Specific Connection: Retrieve details using its unique
connected_account_id
.