helpful-purple
helpful-purpleβ€’2w ago

[Solved βœ…] COMPOSIO_INITIATE_CONNECTION tool error

In the toolkit 'Composio' the tool 'Composio Intiate Connection' seems to only work for certain apps / toolkits. When I call this tool with the input 'GitHub', it initiates a connection. When I call it for 'Jira' or 'Listennotes', it returns the error message: "{"status":404,"message":"The requested resource was not found"}. Is there something I am doing wrong?
25 Replies
correct-apricot
correct-apricotβ€’2w ago
Could you try toolset.initiate_connection like mentioned in https://docs.composio.dev/patterns/Auth/connected_account?
Composio Docs
Connected Accounts - Composio
Composio enables your agents to connect with Various Tools and work with them
correct-apricot
correct-apricotβ€’2w ago
That's the recommended way. We are fixing composio.initiate_connection and releasing a new version as well Please update and try now.
helpful-purple
helpful-purpleβ€’2w ago
so do we need to change the code no w ? as the library has been updated i am getting multiple errors of connection
other-emerald
other-emeraldβ€’2w ago
you don't need to update it, it should work without any issues. LMK if you face any issues.
helpful-purple
helpful-purpleβ€’2w ago
i am currently getting the errors without changing any thing it was working last week
other-emerald
other-emeraldβ€’2w ago
Can you share the error logs here along with the code snippet?
helpful-purple
helpful-purpleβ€’2w ago
sure
helpful-purple
helpful-purpleOPβ€’2w ago
Here is a live example of an issue my AutoGen agent encountered when trying to initialize 'listennotes'.
helpful-purple
helpful-purpleOPβ€’2w ago
No description
helpful-purple
helpful-purpleβ€’2w ago
you will need to upgrade the package i guess it will fix the issue for now but if the team changes code that frequently it is not reliable to use their beta in our production
Soham
Sohamβ€’2w ago
Hi Arun, Can you please provide the code snippet that is giving error.
helpful-purple
helpful-purpleβ€’2w ago
this one is fixed how can i navigate back to my website after oauth is complete ?
Soham
Sohamβ€’2w ago
oh by using redirect_url variable.
connection_request = toolset.initiate_connection(
entity_id=entity_id,
app=App.GMAIL,
redirect_url=redirect_url,
)
connection_request = toolset.initiate_connection(
entity_id=entity_id,
app=App.GMAIL,
redirect_url=redirect_url,
)
No description
Soham
Sohamβ€’2w ago
Here you can set redirect url to your website and it will work.
helpful-purple
helpful-purpleβ€’7d ago
How can i disconnect an account connection is simple but there is no clarification on disconnecting entity ?
other-emerald
other-emeraldβ€’7d ago
What do you exactly mean by disconnecting an entity? do you mean revoking the tokens of the connected account?
helpful-purple
helpful-purpleβ€’7d ago
yes like we have initiate connection but is there anything to remove that too
other-emerald
other-emeraldβ€’7d ago
I think we do have APIs for this, but they are not public yet. let me check with the team and get back to you. However, you can directly delete the connected accounts from your dashboard.
helpful-purple
helpful-purpleβ€’7d ago
i am using your app in my app so each user is connected to composio in that way, every entity is a user, so disconnection from dashboard direct won't be a good option
other-emerald
other-emeraldβ€’6d ago
Got it. We do have an endpoint for this but not public yet. Let me share a code snippet for this.
helpful-purple
helpful-purpleβ€’3d ago
can you share
other-emerald
other-emeraldβ€’3d ago
please try the below: curl --location --request DELETE "https://backend.composio.dev/api/v1/connectedAccounts/{connectedAccountId}" \ --header 'x-api-key: {your_api_key}'
foreign-sapphire
foreign-sapphireβ€’2d ago
Hey @arun, did it worked for you??
foreign-sapphire
foreign-sapphireβ€’2d ago
yes that worked thanks
foreign-sapphire
foreign-sapphireβ€’2d ago
That's amazing, let us know if you need anything else πŸ˜„