Skip to main content

2) User level access token

An access token is a requirement for making requests via the API. You can get an access token using an auth_token. See more information about requesting an auth_token.

The endpoint for our production API is below:

api.hotelmanager.co/graphql

Requesting a user level access token

When a user consents to connecting your app to Hotel Manager, they will be redirected to your app with an auth_token in the URL search parameters. You will need to make a request to your API where you can call our API to exchange the auth_token for an accessToken.

query accessToken {
accessToken(authToken: "{auth_token}") {
accessToken
refreshToken
ttl
grantLevel
}
}

Response

{
"accessToken": "xxxxx",
"refreshToken": "xxxxx",
"ttl": 3600,
"grantLevel": ["User"]
}

The accessToken only has User grant levels and will be unable to make any requests that require Hotel level authentication.