Get refresh token

After the successful login, you need to update the refresh token for every 15 minutes. For this API, the payload is transmitted in plain format. Encryption or decryption of the payload is not required before sending the request to the server or when processing the server response

POST
/api/v1/token-refresh

Header Parameters

Acceptstring
Content-Typestring
refreshTokenstring

The current refresh token to exchange for new tokens

Response Body

application/json

application/json

application/json

const body = JSON.stringify({  "refreshToken": "string"})fetch("https://merchantapisandbox.hesabe.com/api/v1/token-refresh", {  method: "POST",  headers: {    "Content-Type": "application/json",    "Accept": "application/json"  },  body})
{
  "status": true,
  "message": "Success",
  "response": {
    "token": {
      "token_type": "Bearer",
      "expires_in": 900,
      "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIyIiwianRpIjoiM2FlZTFjN2U2NGY2YjVhYzBmNjIxMzE3NjQ1ZjY5ZjE4NGZhNDU4OTIzM2M0NjMzZTU4ZmU5OTk5N2YyOGJjNDgyMzdiMjI2YjhhNGRkMWUiLCJpYXQiOjE3NjA0MjE0MjMuMzExNjIzLCJuYmYiOjE3NjA0MjE0MjMuMzExNjI1LCJleHAiOjE3NjA0MjIzMjMuMjk2MjY2LCJzdWIiOiI4NCIsInNjb3BlcyI6WyIqIl19.YCcExTORxi5guzIvm0FwxOqSm9bJsgdJVP8Dwzwav7Ww4EO9P55rMScBUJWR-AXOn7MjePj6L2qtu0P59gNwxmx1abRahwwVQs1NuagY0aPoHDnJAfLZV3Hc5bAiIG6ZMLCE3W2YHX-j1_UJdc__PqqmyQwQzxqkHDJx_hLzVnVuVUDmEU1MqOXTJ7bCHOOufjFsFU56VMTog1bUz2ZqU2yKCbjIuHHRK2J0cqzd7eHkGT-nMXgSLLkmuQqsus1aPlKZ79RjtLgisbtINopRCD439RKWEweAnGltCFbRnISIBCppVRYGF-nqzpa7uiBv9Eq4KJaJLK9GlVTEN3qudRUmZWexhGuKNRZC97-f-3YgTndzs8-JOYvtS7WzTpp4nU2Mxn6Nepj4dnanYcuMBi3TJe7g0BSoJz1ZO0CQn0QNvVK1v2qN-RE0NqcNofelbhwwXhkarzaSjsY5QaRwKdlHh0afWbcf0UVYV1BkJAzJBK1AJBQOMKKNcvjdzKSq_S74D7vbAhqhDCxJM8uDwrhaNuFiQvjz57i3wC5P62RRNVvNSVCJmP_AKx1uP8w4DELWmz1KEYRrfCZuzYst7p9Jo3vm77vaWhFkKosuQBpgI1KiRyaQNLWh5Iytg_6rHpSpe_zk1LQQzTD2o0RaHHZ_Qh9KfTs2ty7mEUXM4zc",
      "refresh_token": "def50200899907c61ac535a09c8b604549e08f541c22dbb4876eef10162136f9ea29a8965eb27acec0ba9df2f09958dd4bef2f733d4f3bf794dfd68e8de37f514cbdd552beb99ed39131e31de7ddd7d20f18c81cf3358d970b485925d0d9e9e0df78e099b98796c5cf0208d36dde8ababcc1fab154a241c99c67ee1fbe1e0655f5a90f6ec1e0c914b9a8143f2a17f9560faae086e98f97906dfbb7e4b98fcf2f8553a59fd6bd407b0fb78d474c9289c49f07ce8e1bdb1510261508615a077add7f53f1bdd9ad6561644a40990b3eccfed7bbdfb486ed6449c242d935590e914e01a7c17d73bd97e6bcd3c6a2aba8d847ae0887c5c4fd7e0afff538fefba0aa426a73251083758ce92d8c56e8e3aa5e2433e7a4c8d651ec1e7a59959f25b3f8c74f3f99a7c54cb25f6dd0b740417357234038f0b6de9f91ffe306aab30510dee9fa729c68124abe23a1677aa52e9d71664a41a0290beaf375f08c14716d8ea6a88fc43ac651"
    }
  }
}
{
  "status": false,
  "message": "Request not found, Please verify the request data",
  "response": null
}
{
  "message": "Internal server error occurred"
}