Authentication¶
TrackMan Cloud APIs use industry standards like OpenId Connect and OAuth 2.0 to authenticate users and grant authorized client applications access to protected API resources.
Request token¶
To access your API, you must request an Access Token for it. To do so, you will need to POST
to the token
URL on the login server https://login.trackman.com/connect/token.
Example POST to token URL
curl --request POST \
--url 'https://login.trackman.com/connect/token' \
--header 'content-type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials \
--data client_id=YOUR_CLIENT_ID \
--data client_secret=YOUR_CLIENT_SECRET \
Parameters¶
Parameter Name | Description |
---|---|
grant_type | Set this to "client_credentials". |
client_id | Your application's Client ID. You can find this value on the application's settings tab. |
client_secret | Your application's Client Secret. You can find this value on the application's settings tab.API's settings tab. |
Response¶
If all goes well, you'll receive an HTTP 200
response with a payload containing access_token
, token_type
, and expires_in
values:
{
"access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjI3NGRhMmRhZmI4OTE2NDBmZjcyN...",
"expires_in": 3600,
"token_type": "Bearer",
"scope": "https://auth.trackman.com/bay-management/remote-control https://auth.trackman.com/dr/facility"
}
Access to all APIs requires a Bearer token to be present in the Authorization header of each http request. The token must be a valid, signed JWT token, which is obtained by the TrackMan authorization server. i.e.:
GET /api/facilities
Host: https://api.trackmanrange.com
Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjI3NGRhMmRhZmI4OTE2NDBmZjcyN