{"record":{"id":"bcc90f7e33a81221","repo":"Significant-Gravitas/AutoGPT","slug":"integration-with-provider-provider-name-is-not","errorCode":null,"errorMessage":"Integration with provider '{provider_name}' is not configured.","messagePattern":"Integration with provider '(.+?)' is not configured\\.","errorType":"http","errorClass":"HTTPException","httpStatus":501,"severity":"error","filePath":"autogpt_platform/backend/backend/api/external/v1/integrations.py","lineNumber":234,"sourceCode":"        client_id = (\n            os.getenv(oauth_credentials.client_id_env_var)\n            if oauth_credentials.client_id_env_var\n            else None\n        )\n        client_secret = (\n            os.getenv(oauth_credentials.client_secret_env_var)\n            if oauth_credentials.client_secret_env_var\n            else None\n        )\n    else:\n        client_id = getattr(settings.secrets, f\"{provider_name}_client_id\", None)\n        client_secret = getattr(\n            settings.secrets, f\"{provider_name}_client_secret\", None\n        )\n\n    if not (client_id and client_secret):\n        logger.error(f\"Attempt to use unconfigured {provider_name} OAuth integration\")\n        raise HTTPException(\n            status_code=status.HTTP_501_NOT_IMPLEMENTED,\n            detail={\n                \"message\": f\"Integration with provider '{provider_name}' is not configured.\",\n                \"hint\": \"Set client ID and secret in the application's deployment environment\",\n            },\n        )\n\n    handler_class = HANDLERS_BY_NAME[provider_name]\n    return handler_class(\n        client_id=client_id,\n        client_secret=client_secret,\n        redirect_uri=redirect_uri,\n    )\n\n\n# ==================== Endpoints ==================== #\n\n","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/external/v1/integrations.py#L216-L252","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before: provider secrets missing in backend/.env\n# POST /integrations/github/oauth/authorize -> 501\n\n# after: backend/.env\nGITHUB_CLIENT_ID=Iv1.abc123\nGITHUB_CLIENT_SECRET=secret_xyz","handlingStrategy":"validation","validationCode":"# Before initiating OAuth, check the provider reports OAuth support\nproviders = client.get(\"/integrations/providers\").json()\noauth_ready = [p for p in providers if p.get(\"oauth\")]\nif provider not in {p[\"id\"] for p in oauth_ready}:\n    raise ConfigError(f\"{provider} OAuth not available/configured on this deployment\")","typeGuard":null,"tryCatchPattern":"try:\n    client.post(f\"/integrations/{provider}/oauth/authorize\", json={\"callback_url\": cb})\nexcept HTTPError as e:\n    if e.response.status_code == 501:\n        raise ConfigError(f\"Deploy {provider}_CLIENT_ID/_CLIENT_SECRET on the platform\") from e\n    raise","preventionTips":["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."],"tags":["oauth","configuration","environment-variables","external-api"],"backgroundTag":null,"analyzedSha":"9c8bb5550f446ba5d3046b78896578742495b3cf","analyzedAt":"2026-08-14T17:17:21.957Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}