Token has expired (tymon/jwt-auth) Laravel Origin: Application & API OSI layer 7 · Application Last updated 4 Nov 2026

Laravel JWT: Tymon\JWTAuth\Exceptions\TokenExpiredException: Token has expired / The token could not be parsed from the request

A JWT sent by the client is expired, invalid or absent, so jwt-auth rejects the request.

Exact message you may see Tymon\JWTAuth\Exceptions\TokenExpiredException: Token has expiredToken has expired JWT LaravelThe token could not be parsed from the requestTymon\JWTAuth\Exceptions\JWTException: Token not providedWrong number of segments JWT Laravel
Seen on: Laravel PHP

Meaning

Tokens have a TTL (JWT_TTL, default 60 minutes). Refresh before expiry using the refresh endpoint (JWT_REFRESH_TTL window), or re-login. "Could not be parsed" means the Authorization: Bearer header is missing or malformed (some servers strip it — Apache needs RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]).

Common causes

  • Token older than JWT_TTL
  • Refresh window also expired
  • Authorization header stripped by Apache/FastCGI
  • Clock skew between servers
  • JWT_SECRET changed

⚡ Quick fix

  1. Refresh the token: auth()->refresh() before expiry
  2. Pass Authorization: Bearer <token> exactly
  3. Pass the header through in .htaccess

Detailed fix by platform

Apache

  1. .htaccess: RewriteCond %{HTTP:Authorization} . then RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

How to diagnose

  1. Age — Token vs TTL?
  2. Header — Reaches PHP?
  3. Secret — Unchanged?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

403 This action is unauthorized — Laravel: Illuminate\Auth\Access\AuthorizationException: This action is unauthorized. (Laravel)403 This action is un…Attempt to read property "x" on null — Laravel/PHP 8: ErrorException: Attempt to read property "name" on null (Laravel)Attempt to read prope…Command "x" is not defined — Laravel: Symfony\Component\Console\Exception\CommandNotFoundException: Command "make:livewire" is not defined. Did you mean one of these? (Laravel)Command "x" is not de…DecryptException: The payload is invalid / The MAC is invalid — Laravel: Illuminate\Contracts\Encryption\DecryptException: The payload is invalid. / The MAC is invalid. (Laravel)DecryptException: The…Laravel: Allowed memory size exhausted (request) — Laravel/PHP: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in vendor/laravel/framework (Laravel)Laravel: Allowed memo…Sanctum: 401 Unauthenticated — Laravel Sanctum: {"message":"Unauthenticated."} 401 on API / SPA requests (Laravel)Sanctum: 401 Unauthen…TokenExpiredError — JWT Expired / Invalid Token (Authentication)TokenExpiredErrorToken has…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.