POST/auth/token

User Login

User Login

Implementation Notes:

This endpoint authenticates the validity of a username and password combination. A valid token will be generated if the authentication is successful. Use the username and password provided to you in your ReviewsAPI packet.

Mandatory Fields:

  • userName
  • password
POST/auth/token

Parameter Details

NameInTypeRequiredDescription
bodybodyobjectOptionalnone
» userNamebodystringOptionalnone
» passwordbodystringOptionalnone

Responses

StatusMeaningDescriptionSchema
200OKSuccess
400Bad RequestBad RequestNone
401UnauthorizedAuthentication Failed or Account validity expiredNone
404Not FoundUser Not FoundNone
500Internal Server ErrorInternal server errorNone

Example Request

# You can also use wget
curl -X POST http://localhost:3000/auth/token \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

Body parameter

{
  "userName": "string",
  "password": "string"
}

Example responses

200 Response
{
  "accessToken": "string",
  "tokenType": "Bearer",
  "expiresIn": "1d",
  "userName": "string",
  ".issued": "2019-08-24T14:15:22Z",
  ".expires": "2019-08-24T14:15:22Z"
}

Need Support?

Our team is here to help you integrate and make the most of our APIs. Get in touch for technical support, custom solutions, or any questions.