Traveller's Choice Hotel API
  • 🚩Getting Started with Hotel API
  • πŸ•ΈοΈUnderstanding the API structure
  • πŸ”‘Authentication API
    • Access token
  • πŸ“šHotel Content API
    • Content API
      • Hotels Master
        • Hotels API
        • Hotel detail API
      • Location Master
        • countries
        • States
        • Cities
        • Areas
      • Types Master
        • Room Types Master
          • Room Types API
          • Room Types Detail API
        • Board Type Master
          • Board Types API
          • Board Types Detail API
        • Accommodation Type Master
          • Accommodation Types API
          • Accommodation Type Detail API
        • Chains Master
          • Chains API
          • Chain Detail API
        • Amenities Master
          • Amenities API
          • Amenity Detail API
        • Amenity Group Master
          • Amenity group API
          • Amenity Group Detail API
      • πŸ”„Sync Id
  • 🏨Hotel Booking API
    • Booking API
      • Availability APIs
        • MinRate Availability API
        • Availability API
      • Check Rate API
      • Booking APIs
        • Create a Booking - API
        • Booking Details API
        • Cancel Booking API
  • πŸ•΅οΈTest cases
    • Booking API
  • Webhook
  • Errors
    • Token Error
Powered by GitBook
On this page
  • Request an access token
  • Access token API
  1. Authentication API

Access token

This section will describe how you will authenticate yourself to the Travellerschoice Online identity services, and receive an access token in return, which you can use to access all the endpoints.

Request an access token

The first step in Travellerschoice Hotel API gateway interaction is to authenticate with the identity service and obtain an access token. This token grants authority to perform operations on the gateway APIs. Although each token expires after 10 minutes, you can generate a new one at any time using your Account API key.

Access token API

GET /api/v1/client/tokens/generate

Headers

Name
Value

Content-Type

application/json

api-key

<Your API Key>

Accept-Encoding

gzip

Response

{
    "access_token": "20ed68855cc183dede3b36fb67e5",
    "expiryDate": "2024-10-13T22:24:09.323Z"
}
{
"errors": [
        {
            "message": "Invalid api key"
        }
    ]
}
PreviousUnderstanding the API structureNextContent API

Last updated 7 months ago

πŸ”‘