Latest Legacy

Kick out a participant

You can trigger this request to disconnect a participant from an ongoing multiparty call.

API Endpoint

DELETE https://api.plivo.com/v1/Account/{Auth Id}/MultiPartyCall/name_{mpc_name}/Participant/{all | member_id}/


**For participant call legs that were added to the multiparty call using the <MultipartyCall> XML element: **

  • If onExitActionUrl is not specified the participants will be disconnected and the call will proceed to the next element in the XML document.
  • If onExitActionUrl is specified the participants will be disconnected and the call will proceed to the XML document returned by the onExitActionUrl.

For participant call legs that were added to the multiparty call using the Add Participant API:

  • If on_exit_action_url is not specified the multiparty call will be terminated with the hangup cause “Multiparty Call Ended” (hangup cause code 4020) and hangup cause will be API Request.
  • If on_exit_action_url is specified the participants will be disconnected and the call will proceed to the XML document returned by the on_exit_action_url.

Arguments

No arguments need to be passed.

Returns

Returns an acknowledgement that the participant was disconnected from the multiparty call.

Response

HTTP Status Code: 204

Example Request

1
2
3
4
5
6
import plivo

client = plivo.RestClient(auth_id="<auth_id>", auth_token="<auth_token>")

response = client.multi_party_calls.start_recording(friendly_name='mpc_name', file_format='wav', status_callback_url='https://plivo.com/status')
print(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'rubygems'
require 'plivo'
include Plivo
include Plivo::Exceptions

api = RestClient.new("<auth_id>","<auth_token>")
begin
  response = api.multipartycalls.kick_participant(
    "friendly_name":"mpc_name",
    "member_id":"memberid")
  puts response
rescue PlivoRESTError => e
  puts 'Exception: ' + e.message
end
1
2
3
4
5
6
7
8
9
10
11
12
var plivo = require('plivo');

(function main() {
    'use strict';

    var client = new plivo.Client('<auth_id>', '<auth_token>');
    client.multiPartyCalls.kickParticipant(10, {uuid: '12345678-90123456'}).then(function (response) {
        console.log(response);
    }, function (err) {
        console.error(err);
    });
})();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
require 'vendor/autoload.php';

use Plivo\RestClient;
use Plivo\Exceptions\PlivoRestException;

$client = new RestClient("<auth_id>", "<auth_token>");
try
{
    $response = $client
        ->multiPartyCalls
        ->kickParticipant("member_id", ["friendly_name" => "mpc_name", ]);
    print_r($response);
}
catch(PlivoRestException $ex)
{
    print_r($ex);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.plivo.examples.multipartycall;

import com.plivo.api.Plivo;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.exceptions.PlivoValidationException;
import com.plivo.api.models.multipartycall.*;
import com.plivo.api.util.Utils;

import java.io.IOException;

public class KickParticipant {

  public static void main(String[] args) throws IOException, PlivoRestException, PlivoValidationException {
    Plivo.init("<auth_id>", "<auth_token>");
    try
      {
        MultiPartyCallParticipant participant = MultiPartyCall.participantGetter(MultiPartyCallUtils.friendlyName("myMPC"), "member_id").get();
        participant.kick();
      }
    catch (Exception e)
    {
     e.printStackTrace();
    }
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using Plivo;
using Plivo.Exception;

namespace PlivoExamples
{
    class Program
    {
        static void Main(string[] args)
        {
            var api = new PlivoApi("<auth_id>", "<auth_token>");

            try
            {
                var response = api.MultiPartyCall.KickParticipant(participantId: "member_id", friendlyName: "mpc_name");
                Console.WriteLine(response);
            }
            catch (PlivoRestException e)
            {
                Console.WriteLine("Exception: " + e.Message);
            }

        }
    }
}
1
2
curl -i --user AUTH_ID:AUTH_TOKEN  -X DELETE \
https://api.plivo.com/v1/Account/{auth_id}/MultiPartyCall/name_{mpc_name}/Participant/{all | member_id}/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package main

import (
	"fmt"

	"github.com/plivo/plivo-go/v7"
)

func main() {
	client, err := plivo.NewClient("<auth_id>", "<auth_token>", &plivo.ClientOptions{})
	if err != nil {
		fmt.Print("Error", err.Error())
		return
	}
	err = client.MultiPartyCall.KickParticipant(plivo.MultiPartyCallParticipantParams{FriendlyName: "MPC_Name", ParticipantId: "member_id"})
	if err != nil {
		fmt.Print("Error", err.Error())
		return
	}
	fmt.Printf("disconnected a participant successfully.")
}