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.
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 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
- Refresh the token:
auth()->refresh()before expiry - Pass
Authorization: Bearer <token>exactly - Pass the header through in
.htaccess
Detailed fix by platform
Apache
.htaccess:RewriteCond %{HTTP:Authorization} .thenRewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
How to diagnose
- Age — Token vs TTL?
- Header — Reaches PHP?
- 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:
Similar errors
- 403 This action is unauthorized Laravel: Illuminate\Auth\Access\AuthorizationException: This action is unauthorized.
- Attempt to read property "x" on null Laravel/PHP 8: ErrorException: Attempt to read property "name" on null
- Command "x" is not defined Laravel: Symfony\Component\Console\Exception\CommandNotFoundException: Command "make:livewire" is not defined. Did you mean one of these?
Most viewed in Laravel
- MassAssignmentException Laravel: Illuminate\Database\Eloquent\MassAssignmentException: Add [x] to fillable property to allow mass assignment
- The GET method is not supported for route Laravel: The GET method is not supported for route x. Supported methods: POST (MethodNotAllowedHttpException)
- Route [login] not defined Laravel: Symfony\Component\Routing\Exception\RouteNotFoundException: Route [login] not defined
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 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.
Report a correction or suggest an improvement
Last updated 4 Nov 2026