{"record":{"id":"1b013db6bb4c1927","repo":"ComposioHQ/composio","slug":"no-default-auth-config-found-for-toolkit-toolkit","errorCode":null,"errorMessage":"No Default auth config found for toolkit ${toolkitSlug}","messagePattern":"No Default auth config found for toolkit (.+?)","errorType":"exception","errorClass":"ComposioAuthConfigNotFoundError","httpStatus":null,"severity":"error","filePath":"ts/packages/core/src/models/Toolkits.ts","lineNumber":374,"sourceCode":"    }\n\n    // if no auth config is found, create one for the toolkit\n    if (!authConfigIdToUse) {\n      // create authConfig using composioManagedAuthSchemes\n      if (toolkit.authConfigDetails && toolkit.authConfigDetails.length > 0) {\n        try {\n          const authConfig = await composioAuthConfig.create(\n            toolkitSlug,\n            {\n              type: 'use_composio_managed_auth',\n              name: `${toolkit.name} Auth Config`,\n            },\n            requestOptions\n          );\n          authConfigIdToUse = authConfig.id;\n        } catch (error) {\n          if (error instanceof ComposioClient.APIError && error.status === 400) {\n            throw new ComposioAuthConfigNotFoundError(\n              `No Default auth config found for toolkit ${toolkitSlug}`,\n              {\n                meta: {\n                  toolkitSlug,\n                },\n                cause: error,\n                possibleFixes: [\n                  `Please Create an auth config for the toolkit ${toolkitSlug} via the dashboard`,\n                ],\n              }\n            );\n          }\n          throw error;\n        }\n      } else {\n        throw new ComposioAuthConfigNotFoundError(\n          `No auth configs found for toolkit ${toolkitSlug}`,\n          {","sourceCodeStart":356,"sourceCodeEnd":392,"githubUrl":"https://github.com/ComposioHQ/composio/blob/64b1b85502b1beeb2379e6c9e8bf1104504fa637/ts/packages/core/src/models/Toolkits.ts#L356-L392","documentation":"During Toolkits.authorize, when no explicit authConfigId is provided the SDK tries to resolve the workspace's default auth config; if that backend call returns a 400 APIError, this error signals that no default auth config exists for the toolkit in this workspace/project.","triggerScenarios":"Calling toolkits.authorize({ toolkit: 'x' }) or composio.connect('x') without authConfigId or inline credentials, in a workspace where no default auth config for that toolkit has been created.","commonSituations":"First-time authorization before any auth config was set as default in the dashboard; multiple auth configs exist but none marked default; wrong workspace/API key so the default config isn't visible.","solutions":["Create an auth config for the toolkit (via the dashboard or composio.toolkits.createAuthConfig) and mark it as default, then retry.","Pass an explicit authConfigId to authorize.","Or pass credentials directly (e.g. connectedAccountInitiationParams/apiKey fields) so no default lookup is needed.","Verify you're using the API key for the workspace that actually contains the auth config."],"exampleFix":"// before\nconst connection = await composio.toolkits.authorize({ toolkit: 'github' });\n\n// after\nconst authConfigs = await composio.toolkits.listAuthConfigs('github');\nconst connection = await composio.toolkits.authorize({\n  toolkit: 'github',\n  authConfigId: authConfigs.items[0].id,\n});","handlingStrategy":"fallback","validationCode":"const configs = await composio.toolkits.listAuthConfigs(slug);\nconst hasDefault = configs.items.some(c => c.isDefault);\nif (!hasDefault) { /* create one or pass explicit id */ }","typeGuard":"const hasDefaultAuthConfig = (items: AuthConfig[]): boolean => items.some(c => c.isDefault);","tryCatchPattern":"try {\n  await composio.toolkits.authorize({ toolkit: slug });\n} catch (e) {\n  if (e instanceof ComposioAuthConfigNotFoundError) {\n    const configs = await composio.toolkits.listAuthConfigs(slug);\n    await composio.toolkits.authorize({ toolkit: slug, authConfigId: configs.items[0]?.id });\n  }\n}","preventionTips":["Pass authConfigId explicitly in automated pipelines instead of relying on defaults.","Mark a default auth config per toolkit in each workspace."],"tags":["auth-config","authorize","default-config","toolkit","typescript"],"backgroundTag":"missing-default-auth-config","analyzedSha":"64b1b85502b1beeb2379e6c9e8bf1104504fa637","analyzedAt":"2026-08-28T15:39:33.623Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}