Significant-Gravitas/AutoGPT · error · HTTPException
Failed to generate JWT
Error message
Failed to generate JWT
What it means
Error "Failed to generate JWT" thrown in Significant-Gravitas/AutoGPT.
Source
Thrown at autogpt_platform/backend/backend/api/features/integrations/router.py:1447
# social-linking page will *offer* the user to connect. Blocks
# exist for more platforms than are listed here; the list is
# deliberately narrower so the rollout can verify each network
# end-to-end before widening the user-visible surface. Keep
# in sync with tested platforms — extend as each is verified
# against the block + Ayrshare's network-specific quirks.
allowed_social=[
SocialPlatform.TWITTER,
SocialPlatform.LINKEDIN,
SocialPlatform.INSTAGRAM,
SocialPlatform.YOUTUBE,
SocialPlatform.TIKTOK,
],
expires_in=max_expiry_minutes,
verify=True,
)
except Exception as exc:
logger.error("Error generating Ayrshare JWT for user %s: %s", user_id, exc)
raise HTTPException(
status_code=HTTP_502_BAD_GATEWAY, detail="Failed to generate JWT"
)
expires_at = datetime.now(timezone.utc) + timedelta(minutes=max_expiry_minutes)
return AyrshareSSOResponse(sso_url=jwt_response.url, expires_at=expires_at)
# === PROVIDER DISCOVERY ENDPOINTS ===
@router.get("/providers", response_model=List[ProviderMetadata])
async def list_providers(
user_id: Annotated[str | None, Security(get_optional_user_id)],
) -> List[ProviderMetadata]:
"""
Get metadata for every available provider.
Returns both statically defined providers (from ``ProviderName`` enum) and
dynamically registered providers (from SDK decorators). Each entry includes
a ``description`` declared via ``ProviderBuilder.with_description(...)`` inView on GitHub (pinned to 9c8bb5550f)
Solutions
- Verify the JWT signing key/secret is configured correctly on the server.
- Check server logs for the underlying signing error and retry.
When it happens
Trigger: Thrown at autogpt_platform/backend/backend/api/features/integrations/router.py:1447 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Significant-Gravitas/AutoGPT@9c8bb5550f (2026-08-14).
Data as JSON: /api/errors/7d4a0118c375ba85.
Report an issue: GitHub.