Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 00:45 UTC
docs: show auth config for multiple schemes, remove alias from updating section
Dhawal Upadhyay committed
Apr 9, 2026 at 21:55 UTC
e72f8b7911c7d7a4c83c4dc522f43d844359481f
1 file changed
+21
-17
docs/content/docs/importing-existing-connections.mdx
+21
-17
@@ -28,11 +28,7 @@ graph LR
28
29
## Creating an auth config
30
31
-Before importing credentials, you need an auth config for the toolkit. This is a one-time setup.
32
-
33
-<Callout type="info">
34
-Bearer token auth configs work with **any toolkit that supports OAuth2 or S2S auth** — including Gmail, GitHub, Slack, Google Docs, and more. This lets you import your own access tokens without setting up an OAuth app.
35
-</Callout>
31
+Before importing credentials, you need an auth config for the toolkit. This tells Composio which auth scheme to use. This is a one-time setup per toolkit.
32
33
<Tabs groupId="language" items={['Python', 'TypeScript', 'curl']} persist>
34
<Tab value="Python">
@@ -41,6 +37,14 @@ from composio import Composio
37
38
composio = Composio(api_key="your-api-key")
39
40
+# For API key toolkits (e.g., SendGrid, Tavily)
41
+auth_config = composio.auth_configs.create("sendgrid", {
42
+ "type": "use_custom_auth",
43
+ "authScheme": "API_KEY",
44
+ "credentials": {},
45
+})
46
+
47
+# For bearer token — works with any OAuth toolkit (Gmail, GitHub, Slack, etc.)
48
auth_config = composio.auth_configs.create("gmail", {
49
"type": "use_custom_auth",
50
"authScheme": "BEARER_TOKEN",
@@ -56,6 +60,14 @@ import { Composio } from '@composio/core';
60
61
const composio = new Composio({ apiKey: 'your-api-key' });
62
63
+// For API key toolkits (e.g., SendGrid, Tavily)
64
+const authConfig = await composio.authConfigs.create('sendgrid', {
65
+ type: 'use_custom_auth',
66
+ authScheme: 'API_KEY',
67
+ credentials: {},
68
+});
69
+
70
+// For bearer token — works with any OAuth toolkit (Gmail, GitHub, Slack, etc.)
71
const authConfig = await composio.authConfigs.create('gmail', {
72
type: 'use_custom_auth',
73
authScheme: 'BEARER_TOKEN',
@@ -82,6 +94,10 @@ curl -X POST https://backend.composio.dev/api/v3/auth_configs \
94
</Tab>
95
</Tabs>
96
97
+<Callout type="info">
98
+Bearer token auth configs work with **any toolkit that supports OAuth2 or S2S auth** — including Gmail, GitHub, Slack, Google Docs, and more. This lets you import your own access tokens without setting up an OAuth app.
99
+</Callout>
100
+
101
## API keys
102
103
For services that use API key authentication (e.g., SendGrid, Tavily, PostHog):
@@ -267,18 +283,6 @@ curl -X PATCH https://backend.composio.dev/api/v3/connected_accounts/ca_xxx \
283
</Tab>
284
</Tabs>
285
270
-You can also update the alias or both at once:
271
-
272
-```bash
273
-# Update alias
274
-curl -X PATCH .../api/v3/connected_accounts/ca_xxx \
275
- -d '{"alias": "work-gmail"}'
276
-
277
-# Remove a field (set to null)
278
-curl -X PATCH .../api/v3/connected_accounts/ca_xxx \
279
- -d '{"connection":{"state":{"authScheme":"API_KEY","val":{"subdomain":null}}}}'
280
-```
281
-
286
Fields you omit are preserved. Fields set to `null` are removed.
287
288
## Using with Tool Router