v1

latestOpenAPI 3.0.32026-08-06150495.9 KB
Partner Authentication

Refresh Access Tokens

Refresh Token API

Request URL

POST {{base-url}}/v1/partnerApi/auth/refresh

Request Body

The request body must be in JSON format and should include the following parameter:

FieldTypeDescription
refreshstringThe refresh token that is used to obtain a new access token.

Example Request Body:

{
  "refresh": "YourToken"
}

Response

Upon a successful request, the API returns a JSON response with the following structure:

FieldTypeDescription
statusbooleanIndicates whether the request was successful.
statusCodeintegerThe status code of the response.
messagestringA message providing additional information about the response.
resultobjectContains the result of the request.
tokenstringThe newly issued access token.
errornull or objectContains error information if any occurred during the request.

Example Response:

{
    "status": true,
    "statusCode": 200,
    "message": "Token refreshed successfully",
    "result": {
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImMzNjlmYzU4LTQ4NDg3V5cyIsImlhdCI6MTc1MTk4MDA4OSwiZXhwIjoxNzUyMDY2NDg5fQ.TLm0D4ZO4tNwNTCygFIzg0QwXZmeD_3KEKWpWkU"
    },
    "error": null
}

Status Codes

  • 200 OK: The request was successful, and the token has been refreshed.

  • Other status codes may indicate different types of errors or issues with the request.

This endpoint is essential for maintaining user sessions without requiring frequent logins, enhancing user experience while ensuring security.

post/v1/partnerApi/auth/refresh

Request body

refreshstring

Example request

{
  "refresh": "YourToken"
}

Response

200

{"stackTrail":"paths:/v1/partnerApi/auth/refresh:post:responses:200:content:application/json:schema:properties:error","oasType":"schema","type":"unknown","example":null,"nullable":true}
messagestring
statusboolean
statusCodenumber

Example response

{
  "message": "Token refreshed successfully",
  "result": {
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImMzNjlmYzU4LTQ4NDg3V5cyIsImlhdCI6MTc1MTk4MDA4OSwiZXhwIjoxNzUyMDY2NDg5fQ.TLm0D4ZO4tNwNTCygFIzg0QwXZmeD_3JHRNKEKWpWkU"
  },
  "status": true,
  "statusCode": 200
}