Getting Started¶
The Streaming API uses the same Authentication & Authorization mechanisms as the RTLS API. Simply follow the instructions here and provide the same Authorization and x-dsp-selected-tenant-role headers when establishing the websocket connection.
To ensure that a client’s credentials remain valid for the duration of the connection, clients will have to update their credentials at a regular cadence, or they will be disconnected. See the refreshCredentials command and refreshSuccess event for more details on how to keep the credentials up-to-date.
The Location Intelligence APIs use Machine-to-Machine Authentication and Authorization with OAuth2.0 client credentials flow.
End-user requests Enlighted for API access.
Once approved, Enlighted will email the end-user with a Client ID and Client Secret.
Request Auth0 service for a Bearer token using a Client ID and Secret provided by Enlighted.
Example request for Bearer Token¶
curl --request POST \
--url https://enlightedinc-p01.us.auth0.com/oauth/token \
--header 'content-type: application/json' \
--data '{"client_id":<client_id>,"client_secret":<client_secret>,"audience":"https://rtls-us-east-1-prod.dsp.enlightedinc.com","grant_type":"client_credentials"}'
Response¶
{
"access_token": <access_token>,
"token_type": "Bearer"
}
Connection parameters¶
The following parameters can be provided as query string parameters when establishing the connection to the streaming API in order to control the connection:
Parameter | Type | Default | Notes |
---|---|---|---|
enterpriseId | int | N/A | The ID of the enterprise to subscribe to data for. Must be provided |
floors | string (can be provided multiple times to select multiple options) | N/A | Set of floors to subscribe to data from. If not provided, no filtering is applied |
eventTypes | string (can be provided multiple times to select multiple options) | All event types except floorExit | The eventTypes to subscribe to |
tagHeartbeatInterval | int (must be between 300 and 86400) | 14395 | How frequently (in seconds) to receive tagHeartbeat messages |