@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 04:45 UTC

next
ts 16 lines 473 Bytes
Raw
1 import { Composio } from '@composio/core';
2
3 const composio = new Composio({
4 apiKey: process.env.COMPOSIO_API_KEY,
5 });
6
7 const authConfigId = process.env.COMPOSIO_EXAMPLES_GMAIL_AUTH_CONFIG_ID; // your auth config ID
8 if (!authConfigId) {
9 throw new Error('Set COMPOSIO_EXAMPLES_GMAIL_AUTH_CONFIG_ID');
10 }
11
12 const connectionRequest = await composio.connectedAccounts.initiate('default', authConfigId, {
13 allowMultiple: true,
14 });
15
16 console.log(connectionRequest.redirectUrl);