Get an OAuth bearer token to be able to make authenticated requests.
Resource | Description |
---|---|
POST /v1/Token | Get a bearer token |
Get a bearer token.
Body
Name | Type | Description |
---|---|---|
grant_type | string | OAuth grant type used.It's value must be "password". |
username | string | User's username |
password | string | User's password |
domain | string | The hoteliga domain |
Response
Name | Type |
---|---|
access_token | Requested OAuth token |
token_type | Type of authorization |
expires_in | Time period in minutes during which token is valid |
Notes
1. Use the following headers to make the request.
Content-type: multipart/form-data2. A token is valid for 24 hours. Reuse your token, do not create new tokens all the time to avoid reaching the daily limit.
Example body
grant_type=password&username=<username>&password=<password>&domain=<domain>
Example response
{ "access_token":"I5VpUPG_j7MWrSyTCqSclj5g-9EPQ-H12222KM_pgQ6Xug1o2XJhUkingPy- P_Ru3AERmPoL866pUbPKlEylfdpufB3KYoOb_IU4zg1UUskMH_5cnxxHKvzgryxdLxw3ZCIrI6s kfYf-t1eJTyDNOU2X5bCyqoVUDuUkWVvFAuNpOri_50XtN1FzwI1zg_dn80fechcLaS5fMBGTUO0s-Ow", "token_type":"bearer", "expires_in":86399 }