POST/authtoken

Authorization

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 Car Rental Rates API packet.


POST/authtoken

Bearer Token Authentication

The access token must be appended to the 'Authorization Header' as depicted in the example below:

Authorization: Bearer A90324XXZUZUgpO0dd6npHcM83CJ...

Parameters

NameInTypeRequiredDescription
bodybodyobjectRequirednone
» userNamebodystringOptionalnone
» passwordbodystringOptionalnone

Responses

StatusMeaningDescriptionSchema
200OKSuccessInline
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

Code Samples

# You can also use wget
curl -X POST /authtoken \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}' \
  -d '{"userName":"string","password":"string"}'

Example Response

200 Response
{
  "type": "string",
  "token": "string",
  "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.