Get Turn Usage by User
This endpoint retrieves a paginated list of TURN server usage statistics for users, indicating the data consumption (in gigabytes) by each user within the current billing period.
GET
https://<appname>.metered.live/api/v2/turn/current_usage_by_user
<appname>
- Replace this with the name of your app.
Request
GET /api/v2/turn/current_usage_by_user
Query Parameters
Parameter | Description | Data Type |
---|---|---|
secretKey | The secret key for application access | String |
page | The page number for pagination | Number |
Responses
Success Response
A JSON object containing a paginated list of users with their usage details:
Field | Description | Data Type | Nested Fields |
---|---|---|---|
data | List of users with usage details | Array | label , username , usageInGB |
has_more | Indicates if there are more records | Boolean |
Nested Fields for data
:
Field | Description | Data Type |
---|---|---|
label | The label associated with the user | String |
username | The username of the user | String |
usageInGB | The total data used by the user in GB | Number |
HTTP Status: 200 OK
Body:
Error Responses
Invalid Secret Key or Not Subscribed to TURN Server Plan:
HTTP Status:
400 Bad Request
Body:
{
"message": "Invalid request. Not subscribed to any turn server plan"
}API Not Available Under Free Plan:
HTTP Status:
400 Bad Request
Body:
{
"message": "api not available under free plan"
}Internal Error:
HTTP Status:
500 Internal Server Error
Body:
{
"message": "Internal error occurred, contact support and provide the event id: <EVENT_ID>"
}