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, 09:30 UTC
docs: add TypeScript example to API key FAQ
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sushmithamallesh committed
Feb 11, 2026 at 19:43 UTC
a4e3a7c5f77ef1761f26ae43077ea96aa50caae2
1 file changed
+15
docs/content/docs/common-faq.mdx
+15
@@ -101,6 +101,8 @@ For toolkits that require API keys (like Tavily, Perplexity, or ImgBB), you can
101
102
Create an auth config for the toolkit, then call `initiate()` with your API key and each user's ID:
103
104
+<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
105
+ <Tab value="Python">
106
```python
107
connection = composio.connected_accounts.initiate(
108
user_id="user_123",
@@ -110,6 +112,19 @@ connection = composio.connected_accounts.initiate(
112
}
113
)
114
```
115
+ </Tab>
116
+ <Tab value="TypeScript">
117
+```typescript
118
+import { AuthScheme } from '@composio/core';
119
+
120
+const connection = await composio.connectedAccounts.initiate('user_123', 'your_auth_config_id', {
121
+ config: AuthScheme.APIKey({
122
+ api_key: 'your_own_api_key',
123
+ }),
124
+});
125
+```
126
+ </Tab>
127
+</Tabs>
128
129
Each user gets their own connected account scoped to their `user_id`, but they all share your API key under the hood. See [API key connections](/docs/tools-direct/authenticating-tools#api-key-connections) for the full setup.
130
</Accordion>