Remove Participant
Use the following Rest API to remove a participant from a running session.
- cURL request
- NodeJS/JS
- Python
- Ruby
- RESULT
cURL -H "Content-Type: application/json" \
-H "Authorization: $YOUR_JWT_TOKEN" \
-d '{"participantId": "<participant-id>"}' \
-XPOST \
https://api.videosdk.live/v1/meeting-sessions/:id/remove-participant
var request = require("node-fetch");
var options = {
method: "POST",
url: "https://api.videosdk.live/v1/meeting-sessions/:id/remove-participant",
headers: { authorization: `${YOUR_JWT_TOKEN}` },
body: JSON.stringify({ participantId: "<participant-id>" }),
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import requests
url = "https://api.videosdk.live/v1/meeting-sessions/:id/remove-participant"
headers = {'authorization': f'Bearer {YOUR_JWT_TOKEN}'}
data = {"participantId": "<participant-id>"}
response = requests.request("POST", url, headers=headers, data=data)
print(response.text)
require 'uri'
require 'net/http'
url = URI("https://api.videosdk.live/v1/meeting-sessions/:id/remove-participant")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["authorization"] = "Bearer #{YOUR_JWT_TOKEN}"
request.body = "{\"participantId\":\"<participant-id>\"}"
response = http.request(request)
puts response.read_body
{
"id": "61adc697a239e84d0aaa7e15",
"meetingId": "25af-rsr2-lk92",
"start": "2021-12-06T08:15:19.121Z",
"end": null,
"participants": [
{
"participantId": "c7wgj9sd",
"name": "John Dow",
"timelog": [
{
"start": "2021-12-06T08:15:20.565Z",
"end": null
}
]
},
{
"participantId": "ofwb7db6",
"name": "John Dow",
"timelog": [
{
"start": "2021-12-06T08:15:27.585Z",
"end": null
}
]
}
]
}
Request
idsession-id
string
Path Parameters
Response
__response
object
id
string
meetingId
string
start
date
end
date
participants
Array<object>
participantId
string
name
string
timelog
Array<object>
start
date
end
date
Properties
Got a Question? Ask us on discord