Authentication API allow you for getting your userId and authToken associated with your Roomonitor login credentials: username and password.
API Server: any Roomonitor API Server or https://bookings.roomonitor.com
Endpoint: /login
HTTP Method:
POST
Parameters:
The parameters must be coded as raw body payload.
or
and
Body Paypload:
username=my_username&password=my_text_plain_password
or in Body JSON
{
"email": "your_email",
"password": "my_text_plain_password"
}
Note: Tokens hasn’t an expiration date but it is possible that in one moment the authToken would be cleaned and you need to call to login API for to generate a new token.
Code: 200
Response:
{
status: "success",
data: {
authToken: "wiiz1sadfdszcHbXJEOxs4-gRp2jNPH6ifxXtAX_Zz",
userId: "vDSCybTdsdWCopT5A"
}
}
Code: 401
Response:
{ status: 401, message: 'Unauthorized' }
API Server: any Roomonitor API Server or https://bookings.roomonitor.com
Endpoint: /logout
HTTP Method:
POST
Authenticated: true
Auth headers:
Body Paypload: None
Code: 200
Response:
{
"status": "success",
"data": {
"message": "You've been logged out!"
}
}
Code: 401
Response:
{ status: 401, message: 'Unauthorized' }