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
docs: Fix high-priority issues in programmatic auth config documentation
claude[bot]d2cc0b8f17b6
diff --git a/fern/pages/src/authentication/programmatic-auth-configs.mdx b/fern/pages/src/authentication/programmatic-auth-configs.mdxindex 45943fb70..f13205d76 100644--- a/fern/pages/src/authentication/programmatic-auth-configs.mdx+++ b/fern/pages/src/authentication/programmatic-auth-configs.mdx@@ -6,7 +6,7 @@ keywords: ""hide-nav-links: true----Auth configs are created once and reused many times. However, when dealing with many toolkits, you may want to create auth configs programmatically.+Auth configs are created once and reused many times. However, when managing multiple toolkits, you may want to create auth configs programmatically.- When creating and destroying auth configs multiple times in your app's lifecycle.- When creating auth configs for your users' users.@@ -14,7 +14,7 @@ Auth configs are created once and reused many times. However, when dealing with## OAuth2 based apps### Using Composio Default Auth-Since OAuth2 is the most common auth type for apps, Composio provides managed auth for most OAuth2 based apps.+Since OAuth2 is the most common authentication type for applications, Composio provides managed auth for most OAuth2 based applications.This is to speed up development and prototyping.This means you don't have to provide your own OAuth credentials.@@ -39,8 +39,8 @@ import { Composio } from "@composio/core";const composio = new Composio();-const authConfig = await composio.authConfigs.create("LINEAR", {- name: "Linear",+const authConfig = await composio.authConfigs.create("GITHUB", {+ name: "GitHub",type: "use_composio_managed_auth",});@@ -48,7 +48,7 @@ console.log(authConfig);```</CodeGroup>-The `auth_config_id` should be stored securely in your database for future use to be created and destroyed multiple times.+The returned `auth_config_id` should be stored securely in your database for future use to be created and destroyed multiple times.You can also provide your own authentication details. The required `credentials` and `authScheme` depend on the auth type.@@ -96,7 +96,11 @@ The process of setting up your own OAuth2 credentials usually involves generatinThe **authorized redirect URI** is the URI that captures the OAuth code that is returned to the app.</Tip>-While doing so, you must ensure to set the **authorized redirect URI** in the OAuth configuration to: `https://backend.composio.dev/api/v3/toolkits/auth/callback`.+While doing so, you must ensure to set the **authorized redirect URI** in the OAuth configuration to:++```+https://backend.composio.dev/api/v3/toolkits/auth/callback+```<Tabs><Tab title="Redirect URI for GitHub"><Frame>@@ -111,7 +115,7 @@ While doing so, you must ensure to set the **authorized redirect URI** in the OA</Tabs>### Specifying scopes-Composio requests a set of _good_ default OAuth2 scopes for each toolkit wherever possible. However, you can override or modify these scopes by passing a `scopes` field to the `credentials` object.+Composio requests a set of appropriate default OAuth2 scopes for each toolkit wherever possible. However, you can override or modify these scopes by passing a `scopes` field to the `credentials` object.<CodeGroup><SnippetCode@@ -135,7 +139,7 @@ Composio requests a set of _good_ default OAuth2 scopes for each toolkit whereve## Other auth types-Composio has plenty of other applications that use different auth types like API keys, Bearer tokens, JWT and even no auth at all.+Composio supports many applications that use different authentication types like API keys, Bearer tokens, JWT and even no authentication at all.Generating the auth config for other auth types only has minor differences.- `use_custom_auth` is used instead of `use_composio_managed_auth`diff --git a/fern/snippets/authentication/python/auth-config.py b/fern/snippets/authentication/python/auth-config.pyindex 63c88eecd..e3cbe663a 100644--- a/fern/snippets/authentication/python/auth-config.py+++ b/fern/snippets/authentication/python/auth-config.py@@ -8,7 +8,9 @@ auth_config = composio.auth_configs.create(options={"type": "use_custom_auth","auth_scheme": "API_KEY",- "credentials": {}+ "credentials": {+ "api_key": "your_api_key_here"+ }},)print(auth_config)diff --git a/fern/snippets/authentication/typescript/auth-config.ts b/fern/snippets/authentication/typescript/auth-config.tsindex e68b999d8..39f16e51d 100644--- a/fern/snippets/authentication/typescript/auth-config.ts+++ b/fern/snippets/authentication/typescript/auth-config.ts@@ -5,7 +5,9 @@ const composio = new Composio();const authConfig = await composio.authConfigs.create('PERPLEXITYAI', {name: 'Perplexity AI',type: 'use_custom_auth',- credentials: {},+ credentials: {+ api_key: 'your_api_key_here',+ },authScheme: 'API_KEY',});