Skip to content

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

1.5 KB
Raw Blame
---
title: "Connected Account Initiate Now Filters by ACTIVE Status"
description: "The initiate method now only considers ACTIVE connected accounts when checking for duplicates"
date: "2026-01-21"
---

## Version Information

### TypeScript/JavaScript
- Package: `@composio/core`
- Version: `0.5.4`+

### Python
- Package: `composio`
- Version: `0.10.9`+

---

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.

## What Changed

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.

### Before (Bug)

```typescript
// @noErrors
// Expired accounts would incorrectly trigger ComposioMultipleConnectedAccountsError
await composio.connectedAccounts.initiate(userId, authConfigId);
// ❌ Error: Multiple connected accounts found (even if they're all expired)
```

### After (Fixed)

```typescript
// @noErrors
// Only ACTIVE accounts are considered
await composio.connectedAccounts.initiate(userId, authConfigId);
// ✅ Works - expired/inactive accounts are ignored
```

## Affected SDKs

- **TypeScript**: `@composio/core`
- **Python**: `composio`

## Backward Compatibility

This is a bug fix with no breaking changes. The behavior now matches the expected intent of the multiple accounts check.