{"record":{"id":"7d4a0118c375ba85","repo":"Significant-Gravitas/AutoGPT","slug":"failed-to-generate-jwt","errorCode":null,"errorMessage":"Failed to generate JWT","messagePattern":"Failed to generate JWT","errorType":"http","errorClass":"HTTPException","httpStatus":502,"severity":"error","filePath":"autogpt_platform/backend/backend/api/features/integrations/router.py","lineNumber":1447,"sourceCode":"            # social-linking page will *offer* the user to connect.  Blocks\n            # exist for more platforms than are listed here; the list is\n            # deliberately narrower so the rollout can verify each network\n            # end-to-end before widening the user-visible surface.  Keep\n            # in sync with tested platforms — extend as each is verified\n            # against the block + Ayrshare's network-specific quirks.\n            allowed_social=[\n                SocialPlatform.TWITTER,\n                SocialPlatform.LINKEDIN,\n                SocialPlatform.INSTAGRAM,\n                SocialPlatform.YOUTUBE,\n                SocialPlatform.TIKTOK,\n            ],\n            expires_in=max_expiry_minutes,\n            verify=True,\n        )\n    except Exception as exc:\n        logger.error(\"Error generating Ayrshare JWT for user %s: %s\", user_id, exc)\n        raise HTTPException(\n            status_code=HTTP_502_BAD_GATEWAY, detail=\"Failed to generate JWT\"\n        )\n\n    expires_at = datetime.now(timezone.utc) + timedelta(minutes=max_expiry_minutes)\n    return AyrshareSSOResponse(sso_url=jwt_response.url, expires_at=expires_at)\n\n\n# === PROVIDER DISCOVERY ENDPOINTS ===\n@router.get(\"/providers\", response_model=List[ProviderMetadata])\nasync def list_providers(\n    user_id: Annotated[str | None, Security(get_optional_user_id)],\n) -> List[ProviderMetadata]:\n    \"\"\"\n    Get metadata for every available provider.\n\n    Returns both statically defined providers (from ``ProviderName`` enum) and\n    dynamically registered providers (from SDK decorators). Each entry includes\n    a ``description`` declared via ``ProviderBuilder.with_description(...)`` in","sourceCodeStart":1429,"sourceCodeEnd":1465,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/backend/backend/api/features/integrations/router.py#L1429-L1465","documentation":"Error \"Failed to generate JWT\" thrown in Significant-Gravitas/AutoGPT.","triggerScenarios":"Thrown at autogpt_platform/backend/backend/api/features/integrations/router.py:1447 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the JWT signing key/secret is configured correctly on the server.","Check server logs for the underlying signing error and retry."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9c8bb5550f446ba5d3046b78896578742495b3cf","analyzedAt":"2026-08-14T17:17:21.957Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}