Significant-Gravitas/AutoGPT · error · HTTPException
Integration with provider '{provider_name}' is not configure
Error message
Integration with provider '{provider_name}' is not configured. What it means
Raised (HTTP 501) by the external OAuth initiation helper `_get_oauth_handler_for_external` when the requested provider's OAuth client ID and secret are missing. The handler looks up credentials either in custom env vars (from CREDENTIALS_BY_PROVIDER) or in `settings.secrets.<provider>_client_id` / `.<provider>_client_secret`, and refuses to construct a handler when either value is empty. It is a server-side configuration gap, not a client error.
Source
Thrown at autogpt_platform/backend/backend/api/external/v1/integrations.py:234
client_id = (
os.getenv(oauth_credentials.client_id_env_var)
if oauth_credentials.client_id_env_var
else None
)
client_secret = (
os.getenv(oauth_credentials.client_secret_env_var)
if oauth_credentials.client_secret_env_var
else None
)
else:
client_id = getattr(settings.secrets, f"{provider_name}_client_id", None)
client_secret = getattr(
settings.secrets, f"{provider_name}_client_secret", None
)
if not (client_id and client_secret):
logger.error(f"Attempt to use unconfigured {provider_name} OAuth integration")
raise HTTPException(
status_code=status.HTTP_501_NOT_IMPLEMENTED,
detail={
"message": f"Integration with provider '{provider_name}' is not configured.",
"hint": "Set client ID and secret in the application's deployment environment",
},
)
handler_class = HANDLERS_BY_NAME[provider_name]
return handler_class(
client_id=client_id,
client_secret=client_secret,
redirect_uri=redirect_uri,
)
# ==================== Endpoints ==================== #
View on GitHub (pinned to 9c8bb5550f)
Solutions
- Register an OAuth app with the provider and set `{PROVIDER}_CLIENT_ID` and `{PROVIDER}_CLIENT_SECRET` in the backend environment (backend `.env` / docker-compose), then restart the backend.
- If the provider uses custom env var names, check `CREDENTIALS_BY_PROVIDER[provider].client_id_env_var` / `client_secret_env_var` and export exactly those variable names.
- Verify via GET `/api/external-api/v1/integrations/providers` which providers report OAuth support, and only initiate flows for providers you have configured.
- If you operate the platform and want a hard failure instead of 501 at request time, add a startup config check that validates OAuth secrets for enabled providers.
Example fix
# before: provider secrets missing in backend/.env # POST /integrations/github/oauth/authorize -> 501 # after: backend/.env GITHUB_CLIENT_ID=Iv1.abc123 GITHUB_CLIENT_SECRET=secret_xyz
Defensive patterns
Strategy: validation
Validate before calling
# Before initiating OAuth, check the provider reports OAuth support
providers = client.get("/integrations/providers").json()
oauth_ready = [p for p in providers if p.get("oauth")]
if provider not in {p["id"] for p in oauth_ready}:
raise ConfigError(f"{provider} OAuth not available/configured on this deployment") Try / catch
try:
client.post(f"/integrations/{provider}/oauth/authorize", json={"callback_url": cb})
except HTTPError as e:
if e.response.status_code == 501:
raise ConfigError(f"Deploy {provider}_CLIENT_ID/_CLIENT_SECRET on the platform") from e
raise Prevention
- Deployment checklist: register OAuth apps and set every {PROVIDER}_CLIENT_ID/_CLIENT_SECRET pair you intend to expose.
- Surface provider configuration status to users via the providers list instead of letting them hit 501.
- Add a startup validation step that fails fast on half-configured providers.
When it happens
Trigger: POST to `/api/external-api/v1/integrations/{provider}/oauth/authorize` (external OAuth initiate) for a provider whose `{PROVIDER}_CLIENT_ID`/`{PROVIDER}_CLIENT_SECRET` env vars or Pydantic settings secrets are unset or empty. Also hit when a custom-credentials provider declares `client_id_env_var`/`client_secret_env_var` names that don't exist in the deployment environment.
Common situations: Fresh self-hosted deployment where only some OAuth apps (e.g. GitHub, Google) are registered; typo'd env var names in `.env` or docker-compose; forgetting to add the secrets to the platform settings backend while the provider block is installed; provider renamed in code so the `{provider_name}_client_id` attribute no longer matches the configured var.
Related errors
- Integration with provider '{provider_name.value}' is not con
- Callback URL origin is not allowed. Allowed origins: {settin
- Provider '{provider}' not found
- Server did not return an access token for the Google Drive p
- Invalid or expired state token
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/bcc90f7e33a81221.
Report an issue: GitHub.