https://linen.dev logo
SHARED accountType — how to pin in another user's ...
# 🖥│support-forum
p
Hey 👋 question about SHARED accountType / ACL introduced in @composio/core@0.9.1. The release notes (https://github.com/ComposioHQ/composio/releases/tag/%40composio%2Fcore%400.9.1) say: > A SHARED connection can be used by other userIds, but only when the connection > is explicitly pinned in a tool-router session's config and only when the > requesting userId passes the connection's ACL. In practice this isn't working for me. Concrete repro: 1) Owner creates a SHARED Gmail.
Copy code
await composio.connectedAccounts.link(
      'workspace_x:owner_actor',
      authConfigId,
      { accountType: 'SHARED', aclConfigForShared: { allowAllUsers: true } }
    );
returns connectedAccount.id = 'ca_owner_gmail' 2) Member (different userId, ACL-allowed) tries to start a session and pin the SHARED account.
Copy code
const session = await composio.create('workspace_x:member_actor', {
      connectedAccounts: { gmail: 'ca_owner_gmail' },
    });
That throws:
Copy code
400 {
      "error": {
        "message": "Could not find connected account(s) ca_owner_gmail belonging
                    to user \"workspace_x:member_actor\". Check that the IDs are
                    correct and belong to the same user as this session.",
        "code": 4306,
        "slug": "ToolRouterV2_InvalidConnectedAccountIds",
        "status": 400
      }
    }
So the server only accepts accountIds owned by the session's userId — the ACL on the SHARED account doesn't seem to be consulted at session create. Is
connectedAccounts: { toolkit: 'ca_sharedAccount_from_other_user' }
the intended way to "pin" a SHARED account in another user's session? If yes, 4306 looks like a bug — the router should resolve via ACL. If not, what IS the API? I can't find it in the SDK types or in /docs/configuring-sessions. Thanks!
btw, @composio/core 0.9.1 has a typed class
ComposioSharedConnectionNotAccessibleError
(index.d.cts:5382) doc'd as: > Thrown by toolRouter.session.create() … when the session's userId cannot use a pinned SHARED connection. So the SDK contract says create() should resolve SHARED via ACL. Looks like the V2 ownership check just fires too early and short-circuits to 4306 before the ACL path runs. 🤔
n
@Uday please let us know, this is blocking, we are considering your enterprise offer but this kind of issues pushing us away constantly...
p
@Uday have you fixed anything? it works now 🤔
u
Hi @Piotr Siemieniuk, glad that it's working! @Narkon could you lmk if the issue persists on your end?
3 Views