---
title: "POST /openapi/{version}/auth/token/refresh/"
method: POST
path: "/openapi/{version}/auth/token/refresh/"
tags: ["Authentication"]
---

# POST /openapi/{version}/auth/token/refresh/

`POST /openapi/{version}/auth/token/refresh/`

## Request

- Base URL: `https://base_url`
- URL: `https://base_url/openapi/{version}/auth/token/refresh/`
- Auth: none declared

This endpoint allows you to **refresh** your **JWT Access Token** using a valid **refresh token**. The **refresh token** is provided when the original JWT Access Token is generated and is used to obtain a new access token when the current one expires. This allows continued access to the Locad system without requiring the user to reauthenticate.

### Token Validity:
`access : 24 Hours`
### Request Example:
Use the following `curl` command to refresh your JWT Access Token:

```bash
curl --location '{{url}}/openapi/v2/auth/token/refresh/' \
--header 'Content-Type: application/json' \
--data '{
    "refresh": "{{refresh_token}}"
}''
```

Replace `refresh_token` with your valid refresh token. The response will include a new **access token** that can be used for subsequent API requests.

Upon successful refresh, you will receive a new **access token** that can be used for authentication in further API calls. The **refresh token** is also valid for a limited time, after which a new refresh token will need to be obtained.

## Path parameters

- `version` string, required

## Request body

- TokenRefresh
  - `access` string, required
  - `refresh` string, required

## Response `200`

Successful Refresh JWT Access Token Response. You will receive a new access token to continue making authorized API requests.

- EnvelopedTokenRefresh
  - `success` boolean
  - `data` TokenRefresh, required
    - `access` string, required
    - `refresh` string, required
  - `message` string, required

## Other responses

- `400`: Bad Request - Invalid input.
- `401`: Unauthorized - Invalid or expired credentials.
- `403`: Forbidden - You do not have permission to access this resource.
- `404`: Not Found - The requested resource does not exist.
- `500`: Internal Server Error - Unexpected error occurred.

---

[API](https://skmtc.dev/golocad/apis/locad-api.md) - [All operations](https://skmtc.dev/golocad/apis/locad-api/llms.txt) - [OpenAPI document](https://skmtc.dev/golocad/apis/locad-api/revisions/428200f33a81?raw)
