rare-sapphire
rare-sapphireβ€’4mo 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?
51 Replies
harsh-harlequin
harsh-harlequinβ€’4mo 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
harsh-harlequin
harsh-harlequinβ€’4mo ago
That's the recommended way. We are fixing composio.initiate_connection and releasing a new version as well Please update and try now.
genetic-orange
genetic-orangeβ€’4mo ago
so do we need to change the code no w ? as the library has been updated i am getting multiple errors of connection
evident-indigo
evident-indigoβ€’4mo ago
you don't need to update it, it should work without any issues. LMK if you face any issues.
genetic-orange
genetic-orangeβ€’4mo ago
i am currently getting the errors without changing any thing it was working last week
evident-indigo
evident-indigoβ€’4mo ago
Can you share the error logs here along with the code snippet?
genetic-orange
genetic-orangeβ€’4mo ago
sure
rare-sapphire
rare-sapphireOPβ€’4mo ago
Here is a live example of an issue my AutoGen agent encountered when trying to initialize 'listennotes'.
rare-sapphire
rare-sapphireOPβ€’4mo ago
No description
genetic-orange
genetic-orangeβ€’4mo 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β€’4mo ago
Hi Arun, Can you please provide the code snippet that is giving error.
genetic-orange
genetic-orangeβ€’4mo ago
this one is fixed how can i navigate back to my website after oauth is complete ?
Soham
Sohamβ€’4mo 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β€’4mo ago
Here you can set redirect url to your website and it will work.
genetic-orange
genetic-orangeβ€’4mo ago
How can i disconnect an account connection is simple but there is no clarification on disconnecting entity ?
evident-indigo
evident-indigoβ€’4mo ago
What do you exactly mean by disconnecting an entity? do you mean revoking the tokens of the connected account?
genetic-orange
genetic-orangeβ€’4mo ago
yes like we have initiate connection but is there anything to remove that too
evident-indigo
evident-indigoβ€’4mo 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.
genetic-orange
genetic-orangeβ€’4mo 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
evident-indigo
evident-indigoβ€’4mo ago
Got it. We do have an endpoint for this but not public yet. Let me share a code snippet for this.
genetic-orange
genetic-orangeβ€’4mo ago
can you share
evident-indigo
evident-indigoβ€’4mo ago
please try the below: curl --location --request DELETE "https://backend.composio.dev/api/v1/connectedAccounts/{connectedAccountId}" \ --header 'x-api-key: {your_api_key}'
probable-pink
probable-pinkβ€’4mo ago
Hey @arun, did it worked for you??
other-emerald
other-emeraldβ€’4mo ago
yes that worked thanks
probable-pink
probable-pinkβ€’4mo ago
That's amazing, let us know if you need anything else πŸ˜„
genetic-orange
genetic-orangeβ€’3mo ago
@Karthikeya how can i create integration in case of shopify earlier code is giving error now
evident-indigo
evident-indigoβ€’3mo ago
hey @arun - can you share the code snippet that you're trying?
genetic-orange
genetic-orangeβ€’3mo ago
can you check this
No description
genetic-orange
genetic-orangeβ€’3mo ago
how can i get app id
evident-indigo
evident-indigoβ€’3mo ago
apps = toolset.get_app(App.SHOPIFY) - please use this or you can do this using our api as well. here's how you can do it: https://docs.composio.dev/api-reference/apps/get-app
Composio Docs
Get app - Composio
Composio enables your agents to connect with Various Tools and work with them
genetic-orange
genetic-orangeβ€’3mo ago
this will provide the app id ?
evident-indigo
evident-indigoβ€’3mo ago
yes - it will return dict like this: name='shopify' key='shopify' appId='b891031b-1f9a-4f9a-a301-1495302585a5' description='A leading global commerce platform that allows anyone to sell online\n and in person.' categories=['e-commerce'] meta={'triggersCount': 0, 'actionsCount': 25, 'is_custom_app': False} ............... to only get the appId, you can do this: shopify = toolset.get_app(App.SHOPIFY).appId print(shopify)
genetic-orange
genetic-orangeβ€’3mo ago
for javascript ?
probable-pink
probable-pinkβ€’3mo ago
Like:
const tools = await toolset.getTools({ actions: ["SHOPIFY_ADD_PRODUCT_TO_COLLECTION"] });
const tools = await toolset.getTools({ actions: ["SHOPIFY_ADD_PRODUCT_TO_COLLECTION"] });
Rest you can see all code snippets for all actions both for python and javascript. And you can even try and test the tool there! https://app.composio.dev/app/shopify
other-emerald
other-emeraldβ€’3mo ago
@thatsmeadarsh i don't know but when i run this, it does not provide me my shopify connection even if it exists
No description
other-emerald
other-emeraldβ€’3mo ago
?
probable-pink
probable-pinkβ€’3mo ago
What does it showing to you??
other-emerald
other-emeraldβ€’3mo ago
null
probable-pink
probable-pinkβ€’3mo ago
Strange, wait just woke up now, lemme get fresh and will look into this matter Works for you??
other-emerald
other-emeraldβ€’3mo ago
no problem take your time, just wanted to let you know do i need to update or something
probable-pink
probable-pinkβ€’3mo ago
Btw could you just send a screenshot of your logs in the composio dashboard?!
other-emerald
other-emeraldβ€’3mo ago
\
No description
other-emerald
other-emeraldβ€’3mo ago
please let me know when you are available @thatsmeadarsh
probable-pink
probable-pinkβ€’3mo ago
Could you send me you code??
other-emerald
other-emeraldβ€’3mo ago
i got the shopify using the api but
other-emerald
other-emeraldβ€’3mo ago
i use this, it is not enabling me to use shopify
No description
probable-pink
probable-pinkβ€’3mo ago
Send me in text πŸ˜…
other-emerald
other-emeraldβ€’3mo ago
sure
other-emerald
other-emeraldβ€’3mo ago
genetic-orange
genetic-orangeβ€’3mo ago
@thatsmeadarsh any update on this @Karthikeya any update on this
evident-indigo
evident-indigoβ€’3mo ago
shared this with the team. also please always create a new post in the #πŸ–₯β”‚support-forum so that we can be on top of this.

Did you find this page helpful?