Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
fix(examples): initiate OAuth through the auth-link endpoint
jkomyno82ab42abe218
diff --git a/scripts/examples-provision.mjs b/scripts/examples-provision.mjsindex ac662b860..e4dfb1462 100644--- a/scripts/examples-provision.mjs+++ b/scripts/examples-provision.mjs@@ -272,12 +272,17 @@ for (const { exportPrefix, slug } of selectedBrowserGrantToolkits) {} else {ok = false;if (INITIATE_MISSING) {- const created = await api('POST', '/api/v3.1/connected_accounts', {- auth_config: { id: config.id },- connection: { user_id: USER_ID },+ // POST /connected_accounts is retired for Composio-managed OAuth auth+ // configs (it 400s with a migration message); every toolkit in this loop+ // is exactly that, so the auth-link endpoint is the only way in. It+ // returns the redirect URL directly rather than nesting it under+ // connectionData.+ const created = await api('POST', '/api/v3.1/connected_accounts/link', {+ auth_config_id: config.id,+ user_id: USER_ID,});pendingGrants.push(- `${slug}: authorize in a browser -> ${created.connectionData?.val?.redirectUrl ?? created.redirect_url ?? created.redirect_uri ?? '(no redirect url returned)'}`+ `${slug}: authorize in a browser -> ${created.redirect_url ?? '(no redirect url returned)'}`);} else {pendingGrants.push(