Kick participants from a room session.
POST
/
room_sessions
/
{room_session_id}
/
actions
/
kick
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx();
const response = await client.rooms.sessions.actions.kick('0ccc7b54-4df3-4bca-a65a-3da1ecc777f0');
console.log(response.data);from telnyx import Telnyx
client = Telnyx()
response = client.rooms.sessions.actions.kick(
room_session_id="0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
)
print(response.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Rooms.Sessions.Actions.Kick(
context.TODO(),
"0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
telnyx.RoomSessionActionKickParams{
ActionsParticipantsRequest: telnyx.ActionsParticipantsRequestParam{},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.rooms.sessions.actions.ActionKickParams;
import com.telnyx.sdk.models.rooms.sessions.actions.ActionKickResponse;
import com.telnyx.sdk.models.rooms.sessions.actions.ActionsParticipantsRequest;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionKickParams params = ActionKickParams.builder()
.roomSessionId("0ccc7b54-4df3-4bca-a65a-3da1ecc777f0")
.actionsParticipantsRequest(ActionsParticipantsRequest.builder().build())
.build();
ActionKickResponse response = client.rooms().sessions().actions().kick(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.rooms.sessions.actions.kick("0ccc7b54-4df3-4bca-a65a-3da1ecc777f0")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->rooms->sessions->actions->kick(
'0ccc7b54-4df3-4bca-a65a-3da1ecc777f0',
exclude: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'],
participants: 'all',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx rooms:sessions:actions kick \
--api-key 'My API Key' \
--room-session-id 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0curl --request POST \
--url https://api.telnyx.com/v2/room_sessions/{room_session_id}/actions/kick \
--header 'Content-Type: application/json' \
--data '
{
"participants": "all",
"exclude": [
"7b61621f-62e0-4aad-ab11-9fd19e272e73"
]
}
'{
"data": {
"result": "ok"
}
}{
"success": false,
"message": "Error"
}Path Parameters
The unique identifier of a room session.
Example:
"0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"
Body
application/json
Parameters that can be defined during Kick action.
Response
Success Action Response
Show child attributes
Show child attributes
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx();
const response = await client.rooms.sessions.actions.kick('0ccc7b54-4df3-4bca-a65a-3da1ecc777f0');
console.log(response.data);from telnyx import Telnyx
client = Telnyx()
response = client.rooms.sessions.actions.kick(
room_session_id="0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
)
print(response.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.Rooms.Sessions.Actions.Kick(
context.TODO(),
"0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
telnyx.RoomSessionActionKickParams{
ActionsParticipantsRequest: telnyx.ActionsParticipantsRequestParam{},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.rooms.sessions.actions.ActionKickParams;
import com.telnyx.sdk.models.rooms.sessions.actions.ActionKickResponse;
import com.telnyx.sdk.models.rooms.sessions.actions.ActionsParticipantsRequest;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionKickParams params = ActionKickParams.builder()
.roomSessionId("0ccc7b54-4df3-4bca-a65a-3da1ecc777f0")
.actionsParticipantsRequest(ActionsParticipantsRequest.builder().build())
.build();
ActionKickResponse response = client.rooms().sessions().actions().kick(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.rooms.sessions.actions.kick("0ccc7b54-4df3-4bca-a65a-3da1ecc777f0")
puts(response)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$response = $client->rooms->sessions->actions->kick(
'0ccc7b54-4df3-4bca-a65a-3da1ecc777f0',
exclude: ['7b61621f-62e0-4aad-ab11-9fd19e272e73'],
participants: 'all',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx rooms:sessions:actions kick \
--api-key 'My API Key' \
--room-session-id 0ccc7b54-4df3-4bca-a65a-3da1ecc777f0curl --request POST \
--url https://api.telnyx.com/v2/room_sessions/{room_session_id}/actions/kick \
--header 'Content-Type: application/json' \
--data '
{
"participants": "all",
"exclude": [
"7b61621f-62e0-4aad-ab11-9fd19e272e73"
]
}
'{
"data": {
"result": "ok"
}
}{
"success": false,
"message": "Error"
}