https://linen.dev logo
How do I get user_id from a given accont_id using ...
# 🖥│support-forum
c
I'm trying ot follow along the docs and the new SDK but it's pretty clear the new SDK (v3) doesn't support this https://docs.composio.dev/api-reference/connected-accounts/get-connected-accounts-by-nanoid
Copy code
from composio import Composio
from composio_langchain import LangchainProvider

composio = Composio(api_key="<API_KEY>")

details = composio.connected_accounts.retrieve("<ACCOUNT_ID>")
I get the error
AttributeError: 'ConnectedAccounts' object has no attribute 'retrieve'
c
Hi 👋, Could you try this snippet and lmk if it works for you?
Copy code
python
from composio import Composio
composio = Composio(api_key="<composio-api-key>")
details = composio.connected_accounts.get("ca_XXX")
print(details)
c
Ty
that worked 😄
c
Great! let me know if you need anything.