tymondesigns/jwt-auth · error · Tymon\JWTAuth\Exceptions\JWTException

Token could not be parsed from the request.

Error message

Token could not be parsed from the request.

What it means

Error "Token could not be parsed from the request." thrown in tymondesigns/jwt-auth.

Source

Thrown at src/JWTGuard.php:410

        // to get the underlying model name then allow.
        if (! method_exists($this->provider, 'getModel')) {
            return true;
        }

        return $this->jwt->checkSubjectModel($this->provider->getModel());
    }

    /**
     * Ensure that a token is available in the request.
     *
     * @return \Tymon\JWTAuth\JWT
     *
     * @throws \Tymon\JWTAuth\Exceptions\JWTException
     */
    protected function requireToken()
    {
        if (! $this->jwt->setRequest($this->getRequest())->getToken()) {
            throw new JWTException('Token could not be parsed from the request.');
        }

        return $this->jwt;
    }

    /**
     * Magically call the JWT instance.
     *
     * @param  string  $method
     * @param  array  $parameters
     * @return mixed
     *
     * @throws \BadMethodCallException
     */
    public function __call($method, $parameters)
    {
        if (method_exists($this->jwt, $method)) {
            return call_user_func_array([$this->jwt, $method], $parameters);

View on GitHub (pinned to 6c70930a92)

When it happens

Trigger: Thrown at src/JWTGuard.php:410 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tymondesigns/jwt-auth@6c70930a92 (2026-08-21). Data as JSON: /api/errors/d8e42a0b79a51491. Report an issue: GitHub.