How To Configure Connections?

Learn how to configure connections for your users

What is an Integration?

Integrations in Composio are configuration objects that define how your application connects to external services (like GitHub, Slack, or HubSpot). Each integration encapsulates authentication credentials (OAuth Client ID/Secret), permission scopes, and API specifications that determine how your users can interact with the external service. These configuration objects are used to configure and manage connections with external services.

For example:

  • When you create a GitHub integration, you specify OAuth authentication parameters and permission scopes like repo:read
  • This integration then serves as a reusable template - any user connecting their GitHub account through this integration will have the same standardized access level and authentication flow
  • This ensures consistent and secure access patterns across your entire user base

Creating a New Integration

A single integration can be used by multiple users to connect their accounts. Ideally, create one integration per app unless you need different configurations for specific use cases.

  1. Login at Composio’s Website
  2. Go to the Tools section
  3. Click on any app you want to integrate
  4. Click on Setup on [App Name] Integration
  5. Choose your integration name and click Save

How to Fetch Integrations

1from composio import ComposioToolSet, App
2toolset = ComposioToolSet()
3
4# get all integrations
5print(toolset.get_integrations())
6
7#filter based on app
8print(toolset.get_integrations(app=App.GMAIL))
9
10#filter based on integration id
11print(toolset.get_integration(id="<integration_id>"))
12
13# By auth scheme
14print(toolset.get_integrations(auth_scheme="BEARER_TOKEN"))

Creating a new connection using an Integration

You can follow the same steps as mentioned in Creating a new connection and use integration object (Python) or integrationId (JavaScript).

1from composio import ComposioToolSet
2
3toolset = ComposioToolSet(entity_id="Jessica")
4
5entity = toolset.get_entity()
6
7integration = entity.client.integrations.get_by_id("integration_id...")
8connection_request = entity.initiate_connection(
9 app_name="TWITTER",
10 redirect_url="https://yourwebsite.com/connection/success",
11 integration=integration,
12)
13
14# If the connection method is OAuth, redirect the user to the URL below
15print(connection_request.redirectUrl)

Using Your Own OAuth Developer App

When creating an integration, you can use your own OAuth Developer App instead of Composio’s default one, you can follow the same steps as mentioned in Creating a New Integration and:

  1. Enable the toggle “Use your own Developer App”
  2. Enter your OAuth credentials:
    • Client ID
    • Client Secret

When users connect using this integration, they’ll see your app’s name and logo in the OAuth consent screen instead of Composio’s. Checkout the live demo here