Skip to main content

Delete TURN Credential

This endpoint allows you to remove a specific TURN Credential. TURN Credential deletion is done by providing a username and secretKey.


DELETE
    https://<appname>.metered.live/api/v1/turn/credential?secretKey=<secretKey>

<appname> - replace it the name of your app. <secretKey> - replace it with the secret key of your app.

Request

DELETE /api/v1/turn/credential

Request Body

ParameterDescriptionData Type
usernameThe username of the credential to deleteString

Query Parameters

ParameterDescriptionData Type
secretKeyThe secret key of the appString

Responses

Success Response

A JSON object indicating the success of the operation:

FieldDescriptionData Type
successOperation successBoolean
messageOperation messageString

HTTP Status: 200 OK

Body:

{
"success": true,
"message": "credential removed"
}

Error Responses

  • Invalid username or secretKey:

    HTTP Status: 400 Bad Request

    Body:

    {
    "message": "credential of the specified username is not found"
    }

Code Examples

JavaScript (Fetch API)

fetch("/api/v1/turn/credential?secretKey=<YOUR_SECRET_KEY>", {
method: "DELETE",
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
username: '<USERNAME>'
}),
})