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.

Category
Troubleshooting · Security basics
Time
2–10 min
Last reviewed
What you'll need
  • Access to the app or API
  • Username and password (if re-login is needed)

Step-by-step diagnostic

Step 1 of 7
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.

  1. Refresh token Try refresh, retry, or reopen the app.
  2. Fix clock Sync device clock; wrong time causes JWT rejections.
  3. Re-login Log out and log back in to get a new token.
  4. Regenerate token Create a new API token from the dashboard if available.
  5. 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.

Check the error message. Good: "expired" or "401" — follow this guide. Bad: different error — check the specific message.

You can change your answer later.

Did refresh or retry work?

Many apps auto-refresh. Try refresh, retry, or reopen the app.

Try refresh, retry, or reopen the app. Good: request succeeds. Bad: still fails — check clock or log in again.

You can change your answer later.

Is your device clock correct?

Wrong clock causes JWT validation to fail.

Check system time. Enable NTP sync. Correct if off by more than a few minutes. Good: clock synced. Bad: still wrong — fix and retry.

You can change your answer later.

Fix the clock and retry

Sync NTP, correct the time, then try refresh or re-login again.

Set device date and time to automatic (NTP). Correct if off by more than a few minutes. Try refresh or log in again. Good: clock synced and token works. Bad: still fails after fixing clock—log in again or contact support.

You can change your answer later.

Did logging out and back in work?

Re-login issues a new token.

Log out and log back in. Good: new token works. Bad: still fails — contact support.

You can change your answer later.

Token working?

Token is working. No further action needed.

Contact support

Contact support with the app or API name, error message, and steps you have tried.

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.

Continue to