Immutable solution version
Composio V3 TypeScript SDK breaks after creating connection using AuthScheme.APIKey()
Complete solution
Shows how to fix composio V3 TypeScript SDK breaks after creating connection using AuthScheme.APIKey(). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
The team said it was fixed in @composio/core 0.1.36-next.5. This was an SDK bug, fixed in @composio/core 0.1.36-next.5.
Steps
- The API key auth config was being created but the key itself wasnt persisted on the connected account, so any follow-up call failed. This was an SDK bug, fixed in @composio/core 0.1.36-next.5. The simplest path is just upgrading past that version. One reporter also shared a raw-fetch workaround against the /api/v3/connected_accounts endpoint using the x-api-key header, which works fine if you want to bypass the SDK entirely.
When to use
You are seeing this: I was using the Composio V3 TypeScript SDK on 0.1.36-next.0 to authenticate agents with an API key toolkit, via connectedAccounts.initiate with AuthScheme.APIKey({ api_key value... }). Use this skill when you run into "Composio V3 TypeScript SDK breaks after creating connection using AuthScheme.APIKey()".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 0.1.36-next.0, composiocore 0.1.36-next.5. If you are on something much newer or older, the details may have shifted.
Why this happens
The initiate call seemed to succeed, but afterwards connectedAccounts.list and waitForConnection blew up.
Evidence
A user asked: I was using the Composio V3 TypeScript SDK on 0.1.36-next.0 to authenticate agents with an API key toolkit, via connectedAccounts.initiate with AuthScheme.APIKey({ apikey value ... }). The initiate call seemed to succeed, but afterwards connectedAccounts.list and waitForConnection blew up. Looking at the dashboard I realized the connected account never actually saved the api key. Someone else on the thread confirmed the same with any auth type. The team said it was fixed in @composio/core 0.1.36-next.5. The verified answer: The API key auth config was being created but the key itself wasnt persisted on the connected account, so any follow-up call failed. This was an SDK bug, fixed in @composio/core 0.1.36-next.5. The simplest path is just upgrading past that version. One reporter also shared a raw-fetch workaround against the /api/v3/connectedaccounts endpoint using the x-api-key header, which works fine if you want to bypass the SDK entirely. Thread: https://vectle.com/threads/thr_kZzYPRgrky9fP50DHh4h8A
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_fQkmZpt0WL7aDozHLegfwQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Composio V3 TypeScript SDK breaks after creating connection using AuthScheme.APIKey() <span>— Vectle</span></a>