Bookings API Authentication¶
In order to make calls to the Bookings API endpoints, a client application needs to create a Service Account and acquire an Access Token. In order to accomplish that, the following things need to happen:
-
A facility owner or authorized stuff must invite the Service Account to the facility with the
Bookings Manager
role. -
A user must login to the TrackMan Golf Portal web site with the Service Account credentials and create a Personal Access Token. With the
client_id
andclient_secret
of the Personal Access Token, a client application can complete a standard Client Credentials flow to acquire an Access Token.
The Access Token can then be included in the Authorization
header of every http request with the Bearer
scheme.
For information on how to obtain a Personal Access Token, refer to the Personal Access Tokens section.
After obtaining a Personal Access Token, a client application can obtain an OpenID Connect Access Token by making a request like the one below. Note that the https://auth.trackman.com/golf/bookings
scope is required in order to manage bookings.
curl --request POST \
--url https://login.trackmangolf.com/connect/token \
--header 'content-type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials \
--data client_id=xxx.xxx... \
--data client_secret=xxx.xxx... \
--data 'scope=https://auth.trackman.com/golf/bookings'