Skip to main content

Get TURN Usage

This API endpoint retrieves the current usage, quota, and overage for the current billing cycle.

GET
    https://<appname>.metered.live/api/v1/turn/current_usage

<appname> - replace it the name of your app.

Request

GET /api/v1/turn/credentials

Query Parameters

ParameterDescriptionData Type
secretKeyThe secret key for authorizationString

Response

A JSON object containing the following fields:

FieldDescriptionData Type
quotaInGBThe quota in gigabytes allocated for the current billing cyclenumber
usageInGBThe usage in gigabytes consumed in the current billing cyclenumber
overageInGBThe overage in gigabytes consumed in the current billing cyclenumber

Error Responses

HTTP status code 400: Invalid request. Not subscribed to any turn server plan

HTTP status code 500: Internal error occurred, contact support and provide the event id

Example

Request

GET /api/v1/turn/current_usage?secretKey=mySecretKeyCreatedByApp

Successful Response

{
"quotaInGB": 150,
"usageInGB": 45.12,
"overageInGB": 0
}

Error Response

{
"message": "Invalid request. Not subscribed to any turn server plan"
}