ComposioHQ/composio · error · ComposioAuthConfigNotFoundError

No Default auth config found for toolkit ${toolkitSlug}

Error message

No Default auth config found for toolkit ${toolkitSlug}

What it means

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.

Source

Thrown at ts/packages/core/src/models/Toolkits.ts:374

    }

    // if no auth config is found, create one for the toolkit
    if (!authConfigIdToUse) {
      // create authConfig using composioManagedAuthSchemes
      if (toolkit.authConfigDetails && toolkit.authConfigDetails.length > 0) {
        try {
          const authConfig = await composioAuthConfig.create(
            toolkitSlug,
            {
              type: 'use_composio_managed_auth',
              name: `${toolkit.name} Auth Config`,
            },
            requestOptions
          );
          authConfigIdToUse = authConfig.id;
        } catch (error) {
          if (error instanceof ComposioClient.APIError && error.status === 400) {
            throw new ComposioAuthConfigNotFoundError(
              `No Default auth config found for toolkit ${toolkitSlug}`,
              {
                meta: {
                  toolkitSlug,
                },
                cause: error,
                possibleFixes: [
                  `Please Create an auth config for the toolkit ${toolkitSlug} via the dashboard`,
                ],
              }
            );
          }
          throw error;
        }
      } else {
        throw new ComposioAuthConfigNotFoundError(
          `No auth configs found for toolkit ${toolkitSlug}`,
          {

View on GitHub (pinned to 64b1b85502)

Solutions

  1. Create an auth config for the toolkit (via the dashboard or composio.toolkits.createAuthConfig) and mark it as default, then retry.
  2. Pass an explicit authConfigId to authorize.
  3. Or pass credentials directly (e.g. connectedAccountInitiationParams/apiKey fields) so no default lookup is needed.
  4. Verify you're using the API key for the workspace that actually contains the auth config.

Example fix

// before
const connection = await composio.toolkits.authorize({ toolkit: 'github' });

// after
const authConfigs = await composio.toolkits.listAuthConfigs('github');
const connection = await composio.toolkits.authorize({
  toolkit: 'github',
  authConfigId: authConfigs.items[0].id,
});
Defensive patterns

Strategy: fallback

Validate before calling

const configs = await composio.toolkits.listAuthConfigs(slug);
const hasDefault = configs.items.some(c => c.isDefault);
if (!hasDefault) { /* create one or pass explicit id */ }

Type guard

const hasDefaultAuthConfig = (items: AuthConfig[]): boolean => items.some(c => c.isDefault);

Try / catch

try {
  await composio.toolkits.authorize({ toolkit: slug });
} catch (e) {
  if (e instanceof ComposioAuthConfigNotFoundError) {
    const configs = await composio.toolkits.listAuthConfigs(slug);
    await composio.toolkits.authorize({ toolkit: slug, authConfigId: configs.items[0]?.id });
  }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of ComposioHQ/composio@64b1b85502 (2026-08-28). Data as JSON: /api/errors/1b013db6bb4c1927. Report an issue: GitHub.