POST/authtoken

Authenticate

Get Authentication Token

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 Carrental API packet.

Mandatory Fields:

  • userName
  • password
POST/authtoken

Parameter Details

NameInTypeRequiredDescription
bodybodyobjectRequirednone
» userNamebodystringOptionalnone
» passwordbodystringOptionalnone

Responses

StatusMeaningDescriptionSchema
200OKSuccess
400Bad RequestInvalid grant typeNone
401UnauthorizedAuthentication Failed or Account validity ExpiredNone
403ForbiddenForbidden - Access deniedNone
404Not FoundNo user found with username: {userName}None
500Internal Server ErrorInternal Server ErrorNone

Example Request

# You can also use wget
curl -X POST /authtoken \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

Body parameter

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

Example responses

200 Response
{
  "type": "string",
  "token": "********",
  "expiresIn": "string",
  "issued": "string",
  "expires": "string"
}

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.