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
Parameter | Description | Data Type |
---|---|---|
username | The username of the credential to delete | String |
Query Parameters
Parameter | Description | Data Type |
---|---|---|
secretKey | The secret key of the app | String |
Responses
Success Response
A JSON object indicating the success of the operation:
Field | Description | Data Type |
---|---|---|
success | Operation success | Boolean |
message | Operation message | String |
HTTP Status: 200 OK
Body:
{
"success": true,
"message": "credential removed"
}
Error Responses
Invalid
username
orsecretKey
: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>'
}),
})