Get a new access token

POST /business-user/get-token

Get a new access token using the refresh token.

application/json

Body Required

Responses

  • 200 application/json

    Successful login

    Hide response attributes Show response attributes object
  • 400 application/json

    We're sorry, but it seems there's a data validation error.

    Hide response attribute Show response attribute object
POST /business-user/get-token
curl \
 -X POST https://beta.api.sustainology.life/business-user/get-token \
 -H "Content-Type: application/json" \
 -d '{"refreshToken":"string"}'
Request examples
{
  "refreshToken": "string"
}
Response examples (200)
{
  "message": "Token generated successfully!",
  "response": {
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NjQ....",
    "refreshToken": "eyJhbGcisdewKHkedalsdmnd.."
  }
}
Response examples (400)
{
  "message": "Invalid refresh token."
}