Significant-Gravitas/AutoGPT · error · HTTPException

Admin access required

Error message

Admin access required

What it means

Error "Admin access required" thrown in Significant-Gravitas/AutoGPT.

Source

Thrown at autogpt_platform/autogpt_libs/autogpt_libs/auth/jwt_utils.py:175

                # cache miss that is 30s of a worker doing nothing — bound it
                # to something closer to "the frontend is briefly redeploying".
                timeout=JWKS_FETCH_TIMEOUT_SECONDS,
            )
            _jwks_client_url = url
    return _jwks_client


def verify_user(jwt_payload: dict | None, admin_only: bool) -> User:
    if jwt_payload is None:
        raise HTTPException(status_code=401, detail="Authorization header is missing")

    user_id = jwt_payload.get("sub")

    if not user_id:
        raise HTTPException(status_code=401, detail="User ID not found in token")

    if admin_only and jwt_payload.get("role") != "admin":
        raise HTTPException(status_code=403, detail="Admin access required")

    return User.from_payload(jwt_payload)

View on GitHub (pinned to 9c8bb5550f)

Solutions

  1. Use an account with the admin role to call this endpoint.
  2. Have an administrator grant the required role to your user.

When it happens

Trigger: Thrown at autogpt_platform/autogpt_libs/autogpt_libs/auth/jwt_utils.py:175 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/eafbd89b4c6e7ba4. Report an issue: GitHub.