{"record":{"id":"eafbd89b4c6e7ba4","repo":"Significant-Gravitas/AutoGPT","slug":"admin-access-required","errorCode":null,"errorMessage":"Admin access required","messagePattern":"Admin access required","errorType":"http","errorClass":"HTTPException","httpStatus":403,"severity":"error","filePath":"autogpt_platform/autogpt_libs/autogpt_libs/auth/jwt_utils.py","lineNumber":175,"sourceCode":"                # cache miss that is 30s of a worker doing nothing — bound it\n                # to something closer to \"the frontend is briefly redeploying\".\n                timeout=JWKS_FETCH_TIMEOUT_SECONDS,\n            )\n            _jwks_client_url = url\n    return _jwks_client\n\n\ndef verify_user(jwt_payload: dict | None, admin_only: bool) -> User:\n    if jwt_payload is None:\n        raise HTTPException(status_code=401, detail=\"Authorization header is missing\")\n\n    user_id = jwt_payload.get(\"sub\")\n\n    if not user_id:\n        raise HTTPException(status_code=401, detail=\"User ID not found in token\")\n\n    if admin_only and jwt_payload.get(\"role\") != \"admin\":\n        raise HTTPException(status_code=403, detail=\"Admin access required\")\n\n    return User.from_payload(jwt_payload)\n","sourceCodeStart":157,"sourceCodeEnd":178,"githubUrl":"https://github.com/Significant-Gravitas/AutoGPT/blob/9c8bb5550f446ba5d3046b78896578742495b3cf/autogpt_platform/autogpt_libs/autogpt_libs/auth/jwt_utils.py#L157-L178","documentation":"Error \"Admin access required\" thrown in Significant-Gravitas/AutoGPT.","triggerScenarios":"Thrown at autogpt_platform/autogpt_libs/autogpt_libs/auth/jwt_utils.py:175 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an account with the admin role to call this endpoint.","Have an administrator grant the required role to your user."],"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"}