Chilkat Online Tools

VBScript / Plivo REST API / Stop recording a conference

Back to Collection Items

Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set outFile = fso.CreateTextFile("output.txt", True)

' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.

set http = CreateObject("Chilkat_9_5_0.Http")

http.BasicAuth = 1
http.Login = "{{auth_id}}"
http.Password = "password"

' resp is a Chilkat_9_5_0.HttpResponse
Set resp = http.QuickRequest("DELETE","https://api.plivo.com/v1/Account/<auth_id>/Conference/{conference_name}/Record/")
If (http.LastMethodSuccess = 0) Then
    outFile.WriteLine(http.LastErrorText)
    WScript.Quit
End If

respStatusCode = resp.StatusCode
outFile.WriteLine("Response Status Code = " & respStatusCode)
If (respStatusCode <> 204) Then
    outFile.WriteLine("Response Header:")
    outFile.WriteLine(resp.Header)
    outFile.WriteLine("Response Body:")
    outFile.WriteLine(resp.BodyStr)
    outFile.WriteLine("Failed.")

    WScript.Quit
End If

outFile.WriteLine("Success.")

outFile.Close

Curl Command

curl -X DELETE
	-u '{{auth_id}}:password'
https://api.plivo.com/v1/Account/<auth_id>/Conference/{conference_name}/Record/

Postman Collection Item JSON

{
  "name": "Stop recording a conference",
  "request": {
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Conference/{conference_name}/Record/",
      "protocol": "https",
      "host": [
        "api",
        "plivo",
        "com"
      ],
      "path": [
        "v1",
        "Account",
        "{{auth_id}}",
        "Conference",
        "{conference_name}",
        "Record",
        ""
      ]
    },
    "description": "If the recording was initiated by the above Record API method, you could use this method to stop recording the conference. This is useful when you don’t want to record certain parts of a conference which involves critical details being exchanged on the call.\n\nMore information can be found [here](https://www.plivo.com/docs/voice/api/conference/record-conference#stop-recording-a-conference)"
  },
  "response": [
    {
      "name": "Stop recording a conference",
      "originalRequest": {
        "method": "DELETE",
        "header": [
        ],
        "url": {
          "raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Conference/{conference_name}/Record/",
          "protocol": "https",
          "host": [
            "api",
            "plivo",
            "com"
          ],
          "path": [
            "v1",
            "Account",
            "{{auth_id}}",
            "Conference",
            "{conference_name}",
            "Record",
            ""
          ]
        }
      },
      "code": 204,
      "_postman_previewlanguage": "Text",
      "header": [
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}