Chilkat Online Tools

Swift / Plivo REST API / Kick or disconnect a member from a conference

Back to Collection Items

func chilkatTest() {
    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    let http = CkoHttp()
    var success: Bool

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

    var resp: CkoHttpResponse? = http.QuickRequest("DELETE", url: "https://api.plivo.com/v1/Account/<auth_id>/Conference/{conference_name}/Member/{member_id}/Kick/")
    if http.LastMethodSuccess == false {
        print("\(http.LastErrorText)")
        return
    }

    print("\(resp!.StatusCode.intValue)")
    print("\(resp!.BodyStr)")
    resp = nil

}

Curl Command

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

Postman Collection Item JSON

{
  "name": "Kick or disconnect a member from a conference",
  "request": {
    "method": "DELETE",
    "header": [
    ],
    "url": {
      "raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Conference/{conference_name}/Member/{member_id}/Kick/",
      "protocol": "https",
      "host": [
        "api",
        "plivo",
        "com"
      ],
      "path": [
        "v1",
        "Account",
        "{{auth_id}}",
        "Conference",
        "{conference_name}",
        "Member",
        "{member_id}",
        "Kick",
        ""
      ]
    },
    "description": "This method lets you disconnect a member in a conference. When the member is disconnected the next action would be performed based on the next element in the XML.\n\nMore Information can be found [here](https://www.plivo.com/docs/voice/api/conference/member#kick-a-member-from-conference)"
  },
  "response": [
    {
      "name": "Kick or disconnect a member from a conference",
      "originalRequest": {
        "method": "DELETE",
        "header": [
        ],
        "url": {
          "raw": "https://api.plivo.com/v1/Account/{{auth_id}}/Conference/{conference_name}/Member/{member_id}/Kick/",
          "protocol": "https",
          "host": [
            "api",
            "plivo",
            "com"
          ],
          "path": [
            "v1",
            "Account",
            "{{auth_id}}",
            "Conference",
            "{conference_name}",
            "Member",
            "{member_id}",
            "Kick",
            ""
          ]
        }
      },
      "code": 202,
      "_postman_previewlanguage": "json",
      "header": [
      ],
      "cookie": [
      ],
      "body": "{\n  \"message\": \"kicked\",\n  \"member_id\": \"10\",\n  \"api_id\": \"2867b6e2-58c3-11e1-86da-adf28403fe48\"\n}"
    }
  ]
}