Foxpro / Plivo REST API / Hangup a specific call
Back to Collection Items
LOCAL loHttp
LOCAL lnSuccess
LOCAL loResp
LOCAL lnRespStatusCode
* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Http')
loHttp = CreateObject('Chilkat.Http')
loHttp.BasicAuth = 1
loHttp.Login = "{{auth_id}}"
loHttp.Password = "password"
loResp = loHttp.QuickRequest("DELETE","https://api.plivo.com/v1/Account/<auth_id>/Call/{call_uuid}/")
IF (loHttp.LastMethodSuccess = 0) THEN
? loHttp.LastErrorText
RELEASE loHttp
CANCEL
ENDIF
lnRespStatusCode = loResp.StatusCode
? "Response Status Code = " + STR(lnRespStatusCode)
IF (lnRespStatusCode <> 204) THEN
? "Response Header:"
? loResp.Header
? "Response Body:"
? loResp.BodyStr
? "Failed."
RELEASE loResp
RELEASE loHttp
CANCEL
ENDIF
RELEASE loResp
? "Success."
RELEASE loHttp
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": ""
}
]
}