VB6 / Plivo REST API / Stop playing audio on a 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 ChilkatHttp
Dim success As Long
http.BasicAuth = 1
http.Login = "{{auth_id}}"
http.Password = "password"
Dim resp As ChilkatHttpResponse
Set resp = http.QuickRequest("DELETE","https://api.plivo.com/v1/Account/<auth_id>/Call/{call_uuid}/Play/")
If (http.LastMethodSuccess = 0) Then
Debug.Print http.LastErrorText
Exit Sub
End If
Dim respStatusCode As Long
respStatusCode = resp.StatusCode
Debug.Print "Response Status Code = " & respStatusCode
If (respStatusCode <> 204) Then
Debug.Print "Response Header:"
Debug.Print resp.Header
Debug.Print "Response Body:"
Debug.Print resp.BodyStr
Debug.Print "Failed."
Exit Sub
End If
Debug.Print "Success."
Curl Command
curl -X DELETE
-u '{{auth_id}}:password'
https://api.plivo.com/v1/Account/<auth_id>/Call/{call_uuid}/Play/
Postman Collection Item JSON
{
"name": "Stop playing audio on a call",
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Call/{call_uuid}/Play/",
"protocol": "https",
"host": [
"api",
"plivo",
"com"
],
"path": [
"v1",
"Account",
"{{auth_id}}",
"Call",
"{call_uuid}",
"Play",
""
]
},
"description": "This endpoint allows you to stop an already playing audio file during an active call.\n\nMore information can be found [here](https://www.plivo.com/docs/voice/api/call/play-audio-on-calls#stop-playing-audio-on-calls)"
},
"response": [
{
"name": "Stop playing audio on a call",
"originalRequest": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Call/{call_uuid}/Play/",
"protocol": "https",
"host": [
"api",
"plivo",
"com"
],
"path": [
"v1",
"Account",
"{{auth_id}}",
"Call",
"{call_uuid}",
"Play",
""
]
}
},
"code": 204,
"_postman_previewlanguage": "Text",
"header": [
],
"cookie": [
],
"body": ""
}
]
}