{"record":{"id":"cb00517757f5f110","repo":"Significant-Gravitas/AutoGPT","slug":"integration-with-provider-provider-name-value","errorCode":null,"errorMessage":"Integration with provider '{provider_name.value}' is not configured.","messagePattern":"Integration with provider '(.+?)' is not configured\\.","errorType":"http","errorClass":"HTTPException","httpStatus":501,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/integrations/router.py","lineNumber":1340,"sourceCode":"            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        # Original provider using settings.secrets\n        client_id = getattr(settings.secrets, f\"{provider_name.value}_client_id\", None)\n        client_secret = getattr(\n            settings.secrets, f\"{provider_name.value}_client_secret\", None\n        )\n\n    if not (client_id and client_secret):\n        logger.error(\n            f\"Attempt to use unconfigured {provider_name.value} OAuth integration\"\n        )\n        raise HTTPException(\n            status_code=status.HTTP_501_NOT_IMPLEMENTED,\n            detail={\n                \"message\": f\"Integration with provider '{provider_name.value}' 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_key]\n    frontend_base_url = settings.config.frontend_base_url\n\n    if not frontend_base_url:\n        raise HTTPException(\n            status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,\n            detail=\"Frontend base URL is not configured\",\n        )\n\n    return handler_class(\n        client_id=client_id,","sourceCodeStart":1322,"sourceCodeEnd":1358,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/integrations/router.py#L1322-L1358","documentation":"After the provider has an OAuth handler, the router resolves client_id and client_secret from settings (secrets like {PROVIDER}_client_id / {PROVIDER}_client_secret, or custom env vars for SDK providers). If either is empty, HTTP 501 is returned with a detail object: message \"Integration with provider '{name}' is not configured.\" plus a hint to set the client ID and secret in the deployment environment. The server error log also records 'Attempt to use unconfigured ... OAuth integration'.","triggerScenarios":"GET /integrations/{provider}/login where the provider's OAuth app credentials were never set in .env / deployment secrets; env vars named incorrectly (case, prefix) or only set on the frontend; secrets set in one deployment environment but not the one being hit.","commonSituations":"Fresh self-hosted setup where only some provider secrets were filled in; CI/local runs without the full secret set; renaming the provider so the expected env var name no longer matches; forgetting to configure a newly added OAuth provider.","solutions":["Set {PROVIDER}_client_id and {PROVIDER}_client_secret (uppercased provider name) in the backend deployment environment (.env for local, platform secrets in hosted setups) and restart the backend.","For SDK providers with custom env vars, set the variable names declared in that provider's CREDENTIALS_BY_PROVIDER entry instead of the standard ones.","Verify the running process actually sees the variables (they must reach the backend container, not just the shell).","Check the response detail.hint — it explicitly points to missing client ID/secret."],"exampleFix":"# before: .env\n# GITHUB_client_id=   (empty)\n\n# after: backend .env\nGITHUB_client_id=Iv1.abc123\nGITHUB_client_secret=****","handlingStrategy":"validation","validationCode":"# Deployment smoke test: OAuth secrets present per provider\nfor provider in oauth_providers:\n    cid = os.environ.get(f\"{provider.upper()}_client_id\")\n    csec = os.environ.get(f\"{provider.upper()}_client_secret\")\n    assert cid and csec, f\"{provider} OAuth not configured — login will 501\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set all OAuth client secrets per the deployment docs before enabling provider login.","Run a config smoke test on boot that fails fast on missing secrets.","Read detail.hint in the 501 response — it names exactly what's missing."],"tags":["oauth","http-501","configuration","environment-variables","secrets"],"backgroundTag":null,"analyzedSha":"9c8bb5550f446ba5d3046b78896578742495b3cf","analyzedAt":"2026-08-14T17:17:21.957Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}