Send chat in a meeting session
Sends a chat message into a meeting session.
POST
/
meeting_sessions
/
{id}
/
actions
/
send_chat
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.meetingSessions.actions.sendChat('id', {
text: 'text',
});
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.meeting_sessions.actions.send_chat(
id="id",
text="text",
)
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.MeetingSessions.Actions.SendChat(
context.TODO(),
"id",
telnyx.MeetingSessionActionSendChatParams{
Text: "text",
},
)
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.meetingSessions.actions.ActionSendChatParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionSendChatParams params = ActionSendChatParams.builder()
.text("text")
.build();
var response = client.meetingSessions().actions().sendChat("id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.meeting_sessions.actions.send_chat("id", text: "text")
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->meetingSessions->actions->sendChat(
'id',
text: 'text',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx meeting-sessions:actions send-chat \
--api-key 'My API Key' \
--id id \
--text textcurl --request POST \
--url https://api.telnyx.com/v2/meeting_sessions/{id}/actions/send_chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "I will send the summary after this call."
}
'{
"data": {
"accepted": true
}
}{
"error": {
"code": "invalid_request",
"message": "request is invalid"
}
}{
"error": {
"code": "unauthorized",
"message": "invalid or missing credentials"
}
}{
"error": {
"code": "forbidden",
"message": "credential is not permitted"
}
}{
"error": {
"code": "not_found",
"message": "meeting session not found"
}
}{
"error": {
"code": "invalid_state",
"message": "only scheduled sessions can be updated"
}
}{
"error": {
"code": "invalid_request",
"message": "request body too large"
}
}{
"error": {
"code": "unsupported_capability",
"message": "avatar video is not supported on platform 'unknown'"
}
}{
"error": {
"code": "auth_overloaded",
"message": "authentication temporarily overloaded"
}
}{
"error": {
"code": "internal_error",
"message": "internal server error"
}
}{
"error": {
"code": "provider_error",
"message": "meeting provider rejected chat message"
}
}{
"error": {
"code": "not_configured",
"message": "required feature is not configured"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier for the meeting session.
Example:
"mtgsess_a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Body
application/json
Chat message text to send in the meeting.
Required string length:
1 - 4000Response
The chat message was accepted and is being delivered.
Show child attributes
Show child attributes
Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.meetingSessions.actions.sendChat('id', {
text: 'text',
});
console.log(response.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
response = client.meeting_sessions.actions.send_chat(
id="id",
text="text",
)
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.MeetingSessions.Actions.SendChat(
context.TODO(),
"id",
telnyx.MeetingSessionActionSendChatParams{
Text: "text",
},
)
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.meetingSessions.actions.ActionSendChatParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ActionSendChatParams params = ActionSendChatParams.builder()
.text("text")
.build();
var response = client.meetingSessions().actions().sendChat("id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.meeting_sessions.actions.send_chat("id", text: "text")
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->meetingSessions->actions->sendChat(
'id',
text: 'text',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx meeting-sessions:actions send-chat \
--api-key 'My API Key' \
--id id \
--text textcurl --request POST \
--url https://api.telnyx.com/v2/meeting_sessions/{id}/actions/send_chat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "I will send the summary after this call."
}
'{
"data": {
"accepted": true
}
}{
"error": {
"code": "invalid_request",
"message": "request is invalid"
}
}{
"error": {
"code": "unauthorized",
"message": "invalid or missing credentials"
}
}{
"error": {
"code": "forbidden",
"message": "credential is not permitted"
}
}{
"error": {
"code": "not_found",
"message": "meeting session not found"
}
}{
"error": {
"code": "invalid_state",
"message": "only scheduled sessions can be updated"
}
}{
"error": {
"code": "invalid_request",
"message": "request body too large"
}
}{
"error": {
"code": "unsupported_capability",
"message": "avatar video is not supported on platform 'unknown'"
}
}{
"error": {
"code": "auth_overloaded",
"message": "authentication temporarily overloaded"
}
}{
"error": {
"code": "internal_error",
"message": "internal server error"
}
}{
"error": {
"code": "provider_error",
"message": "meeting provider rejected chat message"
}
}{
"error": {
"code": "not_configured",
"message": "required feature is not configured"
}
}