# Refresh Token

> A token that lasts a long time. It is only used to get new access tokens.

**Field:** Software Development  
**Category:** Auth  
**Also known as:** Refresh Tokens, Token Refresh

## Think of it like

Think of it like a season ticket. When your day pass runs out, it gets you a new one.

## Definition

A refresh token lasts a long time and is only used to get new access tokens. Access tokens run out fast, often within an hour, so the app would keep asking you to log in. Instead, it quietly trades the refresh token for a fresh access token. Refresh tokens can last days or months. They are sent only to the login server, never to every API.

## Example

Emma's access token expires at noon. Her app sends its refresh token, gets a new access token, and she never sees a login screen.

## Why it matters

Users stay logged in for weeks. Each access token still runs out soon, which is safer.

## Common mistake

Never changing the refresh token. Give a new one each time it is used, so a stolen copy is caught and stops working.

## Three principles

- **Gets new access tokens.** Nothing else.
- **Lives longer.** Days or months.
- **Sent rarely.** Only to the login server.

## Related terms

- [Access Token](https://learn.benibix.com/term/development/access-token)
- [JSON Web Token (JWT)](https://learn.benibix.com/term/development/json-web-token)
- [OAuth 2.0](https://learn.benibix.com/term/development/oauth)
- [Session (Web)](https://learn.benibix.com/term/development/session)

## Told apart from

- [Access Token vs Refresh Token](https://learn.benibix.com/compare/access-token-vs-refresh-token): An access token is the short-lived pass you show on each request, and a refresh token is how you get a new one. The access token often lasts minutes, so a stolen one is soon useless. The refresh token lasts days or weeks. It goes only to the login server, and it must be kept far safer.

---

Source: https://learn.benibix.com/term/development/refresh-token
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
