Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

next
md 54 lines 3.86 KB
Rendered Raw
1 Use this for Composio connected-account status, refresh, and identity debugging.
2
3 ## Prefer a new auth link session when a user must reconnect
4
5 Create a new auth link session when a user must authenticate again. Redirect the user to the returned hosted link and wait for the resulting connected account to become active. The older `POST /connected_accounts/{nanoid}/refresh` re-initiation endpoint is deprecated; it did not perform Composio's internal background token refresh.
6
7 If the user completes that auth flow successfully, the connected account can return to `ACTIVE`.
8
9 Example response:
10
11 ```text
12 This starts a new authentication flow. For OAuth connections, the user must open the hosted link and complete provider consent. Once the OAuth flow succeeds, use the newly active connected account.
13 ```
14
15 ## Same user ID does not prove same upstream account
16
17 Do not assume multiple connected accounts under the same `clientUniqueUserId` are duplicates of the same upstream account. A single Composio user ID can legitimately connect personal, work, and business accounts.
18
19 If the root-cause hypothesis depends on repeated reconnects to the same upstream Google/Microsoft/etc. account, verify the upstream identity first. Use a safe profile/current-user action for each connected account, customer-provided labels, or another non-sensitive identity signal.
20
21 ## Hosted connect links expire after 10 minutes
22
23 A hosted connect link/session is short-lived. If the initial authentication flow is not completed within 10 minutes, the link can show wording such as “We couldn't verify the session associated with the link” or “Validation error while processing request.” The dashboard may briefly continue to show the connection as initializing.
24
25 Generate a fresh connect link for the same user and open it immediately. If the new link also fails immediately, contact Composio support with its generation timestamp and the exact error. Do not keep retrying an older link.
26
27 ## Connection status describes a lifecycle, not credential validity
28
29 - `INITIALIZING`: the connection row and hosted flow were created.
30 - `INITIATED`: the user opened or advanced the authentication flow.
31 - `ACTIVE`: the connection flow completed and its credential data was stored.
32 - `EXPIRED`: the flow timed out or the connection can no longer refresh/use its authorization. Read `statusReason` to distinguish those cases.
33
34 `Connection initiation did not complete within 10 minutes` means the original flow timed out; it is not a background token-refresh failure. Generate a fresh link and wait for `ACTIVE` before treating its connected-account ID as usable.
35
36 ## OAuth refresh failures have multiple causes
37
38 An OAuth connection may expire when the provider rejects its refresh token, the user or admin revokes the app, provider security policy invalidates the grant, a rotating-token chain is interrupted, or customer-owned OAuth credentials change. Reconnecting obtains a new grant. If connections repeatedly expire across users, contact Composio support with redacted connection IDs and timestamps instead of repeatedly reconnecting.
39
40 ## Provider tokens are redacted from connected-account responses
41
42 Connected-account APIs do not return raw access or refresh tokens. Use Composio
43 tool execution or [Proxy Execute](https://docs.composio.dev/docs/proxy-execute)
44 when a workflow needs to call a provider API through an existing connection. Do
45 not build a workflow that depends on reading provider tokens from connected-
46 account data.
47
48 ## Revoke provider credentials before removing a connection when required
49
50 Use the connected-account revoke operation when the toolkit supports
51 programmatic provider revocation. When provider-side revocation is unavailable,
52 remove Composio's access in the provider's connected-app settings or rotate the
53 API key in the provider dashboard. Never send access tokens, refresh tokens, API
54 keys, or private-key material to Composio support.