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 21, 12:15 UTC
docs: use Python and TypeScript examples in token custody guide
Brendan O'Leary committed
Sep 14, 2026 at 18:26 UTC
c42fa6ffe6198cdbd27233eb11d14305c6861276
1 file changed
+34
-13
docs/content/docs/security/token-custody.mdx
+34
-13
@@ -8,21 +8,42 @@ Composio stores provider credentials and uses them to execute requests on your b
8
9
In the default Composio Cloud deployment, Composio has custody of those credentials. Keeping a token out of your application and keeping it outside Composio's infrastructure are different requirements. The [deployment options](#deployment-options) below describe that distinction.
10
11
-For example, after connecting a GitHub account, your backend can call GitHub through [Proxy Execute](/reference/api-reference/tools/postToolsExecuteProxy):
12
-
13
-```bash
14
-curl --request POST \
15
- --url https://backend.composio.dev/api/v3.1/tools/execute/proxy \
16
- --header "x-api-key: $COMPOSIO_API_KEY" \
17
- --header 'Content-Type: application/json' \
18
- --data '{
19
- "connected_account_id": "ca_your_github_account",
20
- "endpoint": "/user",
21
- "method": "GET"
22
- }'
11
+For example, after connecting a GitHub account, your backend can call GitHub through [Proxy Execute](/docs/tools-direct/executing-tools#proxy-execute):
12
+
13
+<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
14
+<Tab value="Python">
15
+```python
16
+from composio import Composio
17
+
18
+composio = Composio()
19
+
20
+response = composio.tools.proxy(
21
+ connected_account_id="ca_your_github_account",
22
+ endpoint="/user",
23
+ method="GET",
24
+)
25
+
26
+print(response)
27
+```
28
+</Tab>
29
+<Tab value="TypeScript">
30
+```typescript
31
+import { Composio } from '@composio/core';
32
+
33
+const composio = new Composio();
34
+
35
+const response = await composio.tools.proxyExecute({
36
+ connectedAccountId: 'ca_your_github_account',
37
+ endpoint: '/user',
38
+ method: 'GET',
39
+});
40
+
41
+console.log(response);
42
```
43
+</Tab>
44
+</Tabs>
45
25
-Replace the account ID with your connected account. `COMPOSIO_API_KEY` must belong to that project and have the **Proxy execute** permission. The request contains a Composio API key, which authorizes execution, but no GitHub token. Composio injects that token and returns the provider response.
46
+Replace the account ID with your connected account. Both SDKs read `COMPOSIO_API_KEY` from your environment. The key must belong to that project and have the **Proxy execute** permission. The request contains a Composio API key, which authorizes execution, but no GitHub token. Composio injects that token and returns the provider response.
47
48
## Token boundaries in Composio Cloud
49