ambitious-aqua
ambitious-aqua3mo ago

Composio auth link generation failing

Below code was working earlier, but now it started failing. The link is not getting generated anymore and even with try catch the error is not visible. Any help or pointers would be great.
export async function createComposioLink(userEmail: string, appId: string): Promise<string> {
try {
const entity = client.getEntity(userEmail)
const connection = await entity.initiateConnection(appId)
if (!connection.redirectUrl) throw new Error("Failed to create Composio link")
return connection.redirectUrl
} catch (error) {
console.log(error)
console.error("Error creating Composio link:", error)
throw new Error(`Failed to create Composio link: ${error}`)
}
}
export async function createComposioLink(userEmail: string, appId: string): Promise<string> {
try {
const entity = client.getEntity(userEmail)
const connection = await entity.initiateConnection(appId)
if (!connection.redirectUrl) throw new Error("Failed to create Composio link")
return connection.redirectUrl
} catch (error) {
console.log(error)
console.error("Error creating Composio link:", error)
throw new Error(`Failed to create Composio link: ${error}`)
}
}
3 Replies
like-gold
like-gold3mo ago
can you share the version of Js SDK you're using?
inland-turquoise
inland-turquoise3mo ago
@bishwenduk029
ambitious-aqua
ambitious-aquaOP3mo ago
It is the latest js SDK version 0.2.9-10-1

Did you find this page helpful?