Chilkat Online Tools

Powershell / Plivo REST API / Hangup a Member

Back to Collection Items

Add-Type -Path "C:\chilkat\ChilkatDotNet47-9.5.0-x64\ChilkatDotNet47.dll"

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

$http = New-Object Chilkat.Http

$http.BasicAuth = $true
$http.Login = "{{auth_id}}"
$http.Password = "password"

$resp = $http.QuickRequest("DELETE","https://api.plivo.com/v1/Account/<auth_id>/Conference/{conference_name}/Member/{member_id}/")
if ($http.LastMethodSuccess -eq $false) {
    $($http.LastErrorText)
    exit
}

$respStatusCode = $resp.StatusCode
$("Response Status Code = " + $respStatusCode)
if ($respStatusCode -ne 204) {
    $("Response Header:")
    $($resp.Header)
    $("Response Body:")
    $($resp.BodyStr)
    $("Failed.")

    exit
}

$("Success.")

Curl Command

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

Postman Collection Item JSON

{
  "name": "Hangup a Member",
  "request": {
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Conference/{conference_name}/Member/{member_id}/",
      "protocol": "https",
      "host": [
        "api",
        "plivo",
        "com"
      ],
      "path": [
        "v1",
        "Account",
        "{{auth_id}}",
        "Conference",
        "{conference_name}",
        "Member",
        "{member_id}",
        ""
      ]
    },
    "description": "This method lets you hangup a particular member present in a conference. The member to be disconnected needs to be identified using the member_id\n\nMore information can be found [here](https://www.plivo.com/docs/voice/api/conference/member#hangup-a-member)"
  },
  "response": [
    {
      "name": "Hangup a Member",
      "originalRequest": {
        "method": "DELETE",
        "header": [
        ],
        "url": {
          "raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Conference/{conference_name}/Member/{member_id}/",
          "protocol": "https",
          "host": [
            "api",
            "plivo",
            "com"
          ],
          "path": [
            "v1",
            "Account",
            "{{auth_id}}",
            "Conference",
            "{conference_name}",
            "Member",
            "{member_id}",
            ""
          ]
        }
      },
      "code": 204,
      "_postman_previewlanguage": "Text",
      "header": [
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}