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
mdx 50 lines 1.46 KB
Raw
1 ---
2 title: "Connected Account Initiate Now Filters by ACTIVE Status"
3 description: "The initiate method now only considers ACTIVE connected accounts when checking for duplicates"
4 date: "2026-01-21"
5 ---
6
7 ## Version Information
8
9 ### TypeScript/JavaScript
10 - Package: `@composio/core`
11 - Version: `0.5.4`+
12
13 ### Python
14 - Package: `composio`
15 - Version: `0.10.9`+
16
17 ---
18
19 The `initiate()` method now only considers ACTIVE connected accounts when checking for duplicates. Previously, expired or inactive accounts would incorrectly trigger the multiple accounts error.
20
21 ## What Changed
22
23 When calling `connectedAccounts.initiate()`, the SDK now filters by `statuses: ["ACTIVE"]` when checking for existing accounts. This prevents expired or inactive accounts from blocking new connection creation.
24
25 ### Before (Bug)
26
27 ```typescript
28 // @noErrors
29 // Expired accounts would incorrectly trigger ComposioMultipleConnectedAccountsError
30 await composio.connectedAccounts.initiate(userId, authConfigId);
31 // ❌ Error: Multiple connected accounts found (even if they're all expired)
32 ```
33
34 ### After (Fixed)
35
36 ```typescript
37 // @noErrors
38 // Only ACTIVE accounts are considered
39 await composio.connectedAccounts.initiate(userId, authConfigId);
40 // ✅ Works - expired/inactive accounts are ignored
41 ```
42
43 ## Affected SDKs
44
45 - **TypeScript**: `@composio/core`
46 - **Python**: `composio`
47
48 ## Backward Compatibility
49
50 This is a bug fix with no breaking changes. The behavior now matches the expected intent of the multiple accounts check.