---
title: "Refresh token"
method: POST
path: "/users/refresh-token"
tags: ["🔐 Authentication"]
---

# Refresh token

`POST /users/refresh-token`

The Refresh Access Token API is responsible for refreshing the access token when it expires.

It allows you to make a request to this endpoint with the refresh token, which has a lengthy expiry time, to obtain a new access token.

Simultaneously, the API sets the new access token in a cookie for future authentication purposes while replacing the expired one.

This functionality ensures continuous access to protected resources by automatically renewing the access token **without requiring the user to reauthenticate manually**.

By utilizing the refresh token, the API securely refreshes the access token and updates it in the cookie, ensuring seamless and uninterrupted access to authorized endpoints.

## Response `200`

Refresh token

- object
  - `data` object
    - `accessToken` string
    - `refreshToken` string
  - `message` string
  - `statusCode` number
  - `success` boolean

---

[API](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi.md) · [All operations](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hiteshchoudhary-ssesph/freeapi/versions/a9f3a290e4dc/schema)
