Significant-Gravitas/AutoGPT · warning · HTTPException
Provider '{provider_key}' does not support OAuth
Error message
Provider '{provider_key}' does not support OAuth What it means
When building an OAuth flow handler, the router looks up the provider name in HANDLERS_BY_NAME (registry of providers with OAuth support). If provider_key is absent, HTTP 404 "Provider '{provider_key}' does not support OAuth". This fires before any credential checks — the provider simply has no OAuth handler in this deployment.
Source
Thrown at autogpt_platform/backend/backend/api/features/integrations/router.py:1307
def _get_provider_oauth_handler(
req: Request, provider_name: ProviderName
) -> "BaseOAuthHandler":
# Ensure blocks are loaded so SDK providers are available
try:
from backend.blocks import load_all_blocks
load_all_blocks() # This is cached, so it only runs once
except Exception as e:
logger.warning(f"Failed to load blocks: {e}")
# Convert provider_name to string for lookup
provider_key = (
provider_name.value if hasattr(provider_name, "value") else str(provider_name)
)
if provider_key not in HANDLERS_BY_NAME:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail=f"Provider '{provider_key}' does not support OAuth",
)
# Check if this provider has custom OAuth credentials
oauth_credentials = CREDENTIALS_BY_PROVIDER.get(provider_key)
if oauth_credentials and not oauth_credentials.use_secrets:
# SDK provider with custom env vars
import os
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)View on GitHub (pinned to 9c8bb5550f)
Solutions
- Check GET /integrations (provider list) — it shows which providers are configured; only call OAuth routes for providers in that list.
- Verify spelling of the provider name against the ProviderName enum values.
- If the provider integration is new, update/redeploy the backend so HANDLERS_BY_NAME includes it.
- For API-key-only providers, use the API-key credential flow instead of OAuth.
Example fix
# before: assuming every provider supports OAuth
GET /integrations/{provider}/login
# after: gate on providers actually offering OAuth
providers = (await client.get("/integrations")).json()
if provider not in {p["name"] for p in providers if p.get("oauth")}:
raise SkipOAuth(provider) Defensive patterns
Strategy: validation
Validate before calling
providers = (await client.get("/integrations")).json()
known = {p["name"] for p in providers}
if provider not in known:
raise UnsupportedProvider(provider) # don't call /integrations/{provider}/login Type guard
def supports_oauth(provider: str, providers_response: list[dict]) -> bool:
return any(p["name"] == provider for p in providers_response) Prevention
- Fetch the provider list at app start and gate OAuth entry points on it.
- Keep backend and frontend versions in sync when adding new provider integrations.
When it happens
Trigger: GET /integrations/{provider}/login (or any OAuth-starting route) for a provider that only supports API keys (no OAuth handler registered), a misspelled provider name, or a handler available in newer code but not in the deployed version (stale deployment missing a newly added provider integration).
Common situations: Frontend linking to OAuth for a provider whose block uses API-key auth; version skew after a new provider integration is merged — frontend updated, backend not; typos in provider path segments.
Related errors
- Credential to upgrade not found
- Application not found or you don't have permission to update
- OAuth App not found
- Server did not return an access token for the Google Drive p
- Integration with provider '{provider_name}' is not configure
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/f17a0133aa24e437.
Report an issue: GitHub.