VB.NET / Plivo REST API / Hangup a specific call
Back to Collection Items
' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.
Dim http As New Chilkat.Http
Dim success As Boolean
http.BasicAuth = True
http.Login = "{{auth_id}}"
http.Password = "password"
Dim resp As Chilkat.HttpResponse = http.QuickRequest("DELETE","https://api.plivo.com/v1/Account/<auth_id>/Call/{call_uuid}/")
If (http.LastMethodSuccess = False) Then
Debug.WriteLine(http.LastErrorText)
Exit Sub
End If
Dim respStatusCode As Integer = resp.StatusCode
Debug.WriteLine("Response Status Code = " & respStatusCode)
If (respStatusCode <> 204) Then
Debug.WriteLine("Response Header:")
Debug.WriteLine(resp.Header)
Debug.WriteLine("Response Body:")
Debug.WriteLine(resp.BodyStr)
Debug.WriteLine("Failed.")
Exit Sub
End If
Debug.WriteLine("Success.")
Curl Command
curl -X DELETE
-u '{{auth_id}}:password'
https://api.plivo.com/v1/Account/<auth_id>/Call/{call_uuid}/
Postman Collection Item JSON
{
"name": "Hangup a specific call",
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Call/{call_uuid}/",
"protocol": "https",
"host": [
"api",
"plivo",
"com"
],
"path": [
"v1",
"Account",
"{{auth_id}}",
"Call",
"{call_uuid}",
""
]
},
"description": "This method allows you to hangup an ongoing call. It can also be used to cancel a queued outbound call. If you are looking to hangup an incoming call without answering it, check out the Hangup XML.\nMore information can be found [here](https://www.plivo.com/docs/voice/api/call#hangup-a-call)"
},
"response": [
{
"name": "Hangup a specific call",
"originalRequest": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Call/{call_uuid}/",
"protocol": "https",
"host": [
"api",
"plivo",
"com"
],
"path": [
"v1",
"Account",
"{{auth_id}}",
"Call",
"{call_uuid}",
""
]
}
},
"code": 204,
"_postman_previewlanguage": "Text",
"header": [
],
"cookie": [
],
"body": ""
}
]
}