> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tunimobile.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Refresh the session

> Get a new access token using the refresh_token cookie.

Public endpoint. Uses the `refresh_token` cookie to issue a new `BEARER` cookie **and a new `refresh_token` cookie**. No body.

> [!WARNING]
>
> The refresh token is single use. Always store the new `refresh_token` cookie from the response: the old one stops working.

## Response

`200`: new cookies are set. The body does not contain the tokens.

## Errors

| HTTP | Meaning |
| - | - |
| `401` | Refresh token missing, expired or already used. Log in again. |

> [!TIP]
>
> If several requests fail with `401` at the same time, refresh **once** and retry them all after it completes. Two parallel refresh calls would use the same single-use token and the second would fail.

```bash cURL theme={null}
curl -X POST -c cookies.txt -b cookies.txt \
  https://apitest.tunimobile.com/v1/token/refresh
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.