Fix JWT that expired
We'll get you a valid token—refresh it, fix the clock, or log in again—so the app or API accepts your requests.
What you'll need
- Access to the app or API
- Username and password (if re-login is needed)
Step-by-step diagnostic
Quick triage — pick your path
Get started
Choose the option that matches what you see. You can jump straight to that section.
Show full guide
Steps
Goal: Get a valid token—refresh it, fix the clock, or log in again.
Refresh the token
Try refresh, retry, or reopen the app. Many apps refresh the access token automatically.
Good: Request succeeds.
Bad: Still fails—check the clock or log in again.
Fix the clock
JWTs use timestamps. If your device clock is wrong, the server may reject the token. Sync the clock (NTP) and retry.
Good: Clock synced and token accepted.
Bad: Still wrong—fix the clock and retry.
Log in again
Log out and log back in to get a new token. If the refresh token is expired or revoked, re-login is required.
Good: New token works.
Bad: Still fails—contact support.
When to get help
Contact support if refresh fails, re-login does not work, or you see persistent “token expired” errors after fixing the clock and logging in again. Provide the app or API name and error message.
Verification
- The app or API accepts your requests.
- No “token expired” or “401” errors.
- Session stays active (or you can refresh without re-login).
Escalation ladder
Work from the device outward. Stop when the problem is fixed.
- Refresh token Try refresh, retry, or reopen the app.
- Fix clock Sync device clock; wrong time causes JWT rejections.
- Re-login Log out and log back in to get a new token.
- Regenerate token Create a new API token from the dashboard if available.
- Contact support Provide app name, error message, and steps tried.
What to capture if you need help
Before calling support or posting for help, have these ready. It speeds everything up.
- App or API name
- Error message (e.g. "token expired", "401")
- Whether the clock is synced
- Whether refresh or re-login was tried
Do you see "token expired" or "401" errors?
JWTs expire for security. Refresh the token, fix the clock, or log in again.
You can change your answer later.
Did refresh or retry work?
Many apps auto-refresh. Try refresh, retry, or reopen the app.
You can change your answer later.
Is your device clock correct?
Wrong clock causes JWT validation to fail.
You can change your answer later.
Fix the clock and retry
Sync NTP, correct the time, then try refresh or re-login again.
You can change your answer later.
Did logging out and back in work?
Re-login issues a new token.
You can change your answer later.
Token working?
Contact support
Reviewed by Blackbox Atlas
Frequently asked questions
- Why does a JWT expire?
- JWTs expire for security. A short-lived access token limits damage if stolen. The refresh token lets you get new access tokens without logging in again—until it expires or is revoked.
- What if the refresh token is expired?
- You must log in again. Refresh tokens have longer lifetimes but eventually expire. If you see "refresh token expired" or similar, re-authenticate through the normal login flow.
- Can a wrong clock cause JWT errors?
- Yes. JWTs include "exp" (expiration) and "iat" (issued at) timestamps. If your device clock is wrong, the server may reject the token as expired or not yet valid. Sync your clock to fix this.
Rate this guide
Was this helpful?
Thanks for your feedback.