---
title: "Refreshes a JWT token"
method: POST
path: "/rest/login/refreshjwt"
tags: ["Login APIs"]
---

# Refreshes a JWT token

`POST /rest/login/refreshjwt`

## Request

- Base URL: `https://masonconsole.com`
- URL: `https://masonconsole.com/rest/login/refreshjwt`
- Auth: HTTP bearer

This endpoint allows users to refresh a JWT token. It takes the refreshToken, which was received in the getjwttoken API and generates a new jwt token in the request body.

## Headers

- `accountuser` string, required

## Request body

- RefreshJwtRequest
  - `userName` string: The user name associated with the JWT token.
  - `refreshToken` string: The refresh token used to obtain a new JWT token.

## Response `200`

Successful response

- RefreshJwtResponse
  - `data` RefreshJwtData: The data returned in the response.
    - `token` string
  - `result` string: The result of the login operation. Should be either 'SUCCESS' or 'FAILURE'.
  - `message` string: The message associated with the login response (applicable in case of 'FAILURE').
  - `@class` string, required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests
- `500`: Internal server error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/bymason/apis/mason-device-console-api-docs.md) - [All operations](https://skmtc.dev/bymason/apis/mason-device-console-api-docs/llms.txt) - [OpenAPI document](https://skmtc.dev/bymason/apis/mason-device-console-api-docs/revisions/d9cdcc14b7d1?raw)
