Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getConnections returns an empty list #847

Open
sahildhull2512 opened this issue Nov 11, 2024 · 3 comments
Open

getConnections returns an empty list #847

sahildhull2512 opened this issue Nov 11, 2024 · 3 comments

Comments

@sahildhull2512
Copy link

I am using the following code to add new tools to composio
const connection = await entity.initiateConnection(toolName);
On connect, I am being redirected to auth page of that particular tool, where composio is asking me to authorise it.
So, the tools are getting added.

But when I am getting the list of connected tools in the following line:

const composioConnectedTools = await entity.getConnections();

It returns an empty list.

It was working completely fine till yesterday.
I tried a bunch of different versions from npm.

  • 0.1.13 (this was what I was using earlier)
  • 0.1.17-2
  • 0.2.8
  • 0.2.8-2
  • 0.2.9-5

In all the earlier versions, initiateConnection is itself not working now. Getting the following return value

ConnectionRequest {
    connectionStatus: undefined,
    connectedAccountId: undefined,
    redirectUrl: null
  }

But in the latest version, initiateConnection is working, but getConnection is not.

My guess is this might be the commit that could be a culprit
1ad7d6f#diff-b22149526ec6104b67529b61629841152ae0eabee1cde026493d1bf21332ecebR79

@himanshu-dixit
Copy link
Collaborator

@sahildhull2512 Can you share reproducible code snippet for the issue?

@sahildhull2512
Copy link
Author

sahildhull2512 commented Nov 17, 2024

The following is the code snippet I am using:

const client = new Composio(process.env.COMPOSIO_API_KEY!);

const entity = await client.getEntity(userId);

composioConnectedTools = await entity.getConnections();

@sahildhull2512
Copy link
Author

I tried another method, but this also returns empty list

const toolset = new VercelAIToolSet({
    apiKey: process.env.COMPOSIO_API_KEY!,
});
const tools = await toolset.getTools({ actions: ['get_connections'] });
console.log('Tools from Composio:', tools);

Can you please tell me what function should I be calling to get the list of tools?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants