---
description: Get Refresh token for logged in user.
---

# Refresh Token

## This endpoint allows you to get new refresh token of that user.

<mark style="color:blue;">`GET`</mark> `https://castleindia.in/emart/public /api/refresh	 /api/refresh`

#### Headers

| Name          | Type   | Description                                   |
| ------------- | ------ | --------------------------------------------- |
| Authorization | String | Bearer token {bearer\_token without brackets} |
| Accept        | String | application/json                              |

#### Request Body

| Name           | Type   | Description                               |
| -------------- | ------ | ----------------------------------------- |
| refresh\_token | String | enter previous refresh token of that user |

{% tabs %}
{% tab title="200: OK Upon successful submission you" %}
```javascript
{
  "errors": {
    "refresh_token": [
      "The refresh token field is required."
    ]
  },
  "status": "fail"
}
```
{% endtab %}

{% tab title="401: Unauthorized " %}
```
{
  "message": "Unauthenticated."
}

{
  "error": "invalid_request",
  "error_description": "The refresh token is invalid.",
  "hint": "Cannot decrypt the refresh token",
  "message": "The refresh token is invalid."
}
```
{% endtab %}
{% endtabs %}

### If response is fail

```
{
  "errors": {
    "refresh_token": [
      "The refresh token field is required."
    ]
  },
  "status": "fail"
}
```
