# Refresh Access Token

## Refresh Token

<mark style="color:green;">`POST`</mark> `https://sec-id-api.securitize.io/v1/{clientId}/oauth2/refresh`

Used to exchange provided refresh token for new accessToken.\
NOTE: Access token expires in 7days, refresh token is one time use and expires in 365 days.

#### Path Parameters

| Name     | Type   | Description                                       |
| -------- | ------ | ------------------------------------------------- |
| clientId | string | Your application Client Id provided by Securitize |

#### Headers

| Name          | Type   | Description                                    |
| ------------- | ------ | ---------------------------------------------- |
| authorization | string | Your application secret provided by Securitize |

#### Request Body

| Name         | Type   | Description                                             |
| ------------ | ------ | ------------------------------------------------------- |
| refreshToken | string | Code provided from Authentication flow on users browser |

{% tabs %}
{% tab title="200 Returns new access token and a new refresh token" %}

```
{
  "investorId": "string",
  "accessToken": "string",
  "refreshToken": "string",
  "expiration": "2020-05-23T18:52:03.415Z"
}
```

{% endtab %}

{% tab title="401 " %}

```
{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Failed to authorize",
  "details": null
}
```

{% endtab %}
{% endtabs %}
