Analytics APIEndpoints

Returns the number of live users for a player

Returns how many sessions of the player started in the last `minutes` minutes, for each domain where the player is embedded. A session counts from the moment it started: it does not mean the visitor is still on the page.

GET
/sessions/live_users

Authorization

apiToken apiVersion userAgent
X-Api-Token<token>

Access the application and copy your api token, then, just set the header X-Api-Token with it.

In: header

X-Api-Version<token>

The API version to use. Currently supported versions are:

  • v1: The current stable version

A request without this header, or with any other value, is answered by the edge with 404 and {"error_msg":"404 Route Not Found"}.

In: header

User-Agent<token>

A non-empty User-Agent identifying your integration is required. Requests without it are rejected at the edge before reaching the API.

In: header

Query Parameters

player_id*string

ID of the player, as returned by GET /players/list.

Match^[0-9a-fA-F]{24}$
minutes?integer

How many minutes back to look, from 1 to 720. Defaults to 60.

Range1 <= value <= 720
Default60

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/sessions/live_users?player_id=64a5c8072e6fd10009828db2&minutes=60"
[  {    "domain": "test.com",    "live_users": 200  },  {    "domain": "example.com",    "live_users": 100  }]