Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
docs: add FAQ for using your own API key on behalf of users
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sushmithamallesh committed
Feb 11, 2026 at 19:38 UTC
dccd88018111bb642cf85e4d4fc6baf32a81c7bc
1 file changed
+18
docs/content/docs/common-faq.mdx
+18
@@ -96,6 +96,24 @@ Pass a `callbackUrl` when calling `link()`, `initiate()`, or `session.authorize(
96
You can include your own query parameters in the callback URL (e.g., `?user_id=user_123&source=onboarding`) to carry context through the flow. Composio preserves them. See [sessions](/docs/authenticating-users/manually-authenticating#redirecting-users-after-authentication) or [direct tool setup](/docs/tools-direct/authenticating-tools#redirecting-users-after-authentication).
97
</Accordion>
98
99
+<Accordion title="How do I use my own API key for a toolkit instead of asking each user for theirs?">
100
+For toolkits that require API keys (like Tavily, Perplexity, or ImgBB), you can create connections on behalf of your users by passing your own API key through `connectedAccounts.initiate()`. This way, your users get access to the service without needing to provide their own credentials.
101
+
102
+Create an auth config for the toolkit, then call `initiate()` with your API key and each user's ID:
103
+
104
+```python
105
+connection = composio.connected_accounts.initiate(
106
+ user_id="user_123",
107
+ auth_config_id="your_auth_config_id",
108
+ config={
109
+ "auth_scheme": "API_KEY", "val": {"api_key": "your_own_api_key"}
110
+ }
111
+)
112
+```
113
+
114
+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.
115
+</Accordion>
116
+
117
<Accordion title="Can Composio be self-hosted?">
118
Yes, Composio supports self-hosting on the Enterprise plan. See [pricing](https://composio.dev/pricing) for details or [talk to us](https://calendly.com/composiohq/enterprise).
119
</Accordion>