Chime / Client / send_channel_message
send_channel_message#
- Chime.Client.send_channel_message(**kwargs)#
Sends a message to a particular channel that the member is a part of.
Note
The
x-amz-chime-bearer
request header is mandatory. Use theAppInstanceUserArn
of the user that makes the API call as the value in the header.Also,
STANDARD
messages can contain 4KB of data and the 1KB of metadata.CONTROL
messages can contain 30 bytes of data and no metadata.Warning
This API is is no longer supported and will not be updated. We recommend using the latest version, SendChannelMessage, in the Amazon Chime SDK.
Using the latest version requires migrating to a dedicated namespace. For more information, refer to Migrating from the Amazon Chime namespace in the Amazon Chime SDK Developer Guide.
Danger
This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.
See also: AWS API Documentation
Request Syntax
response = client.send_channel_message( ChannelArn='string', Content='string', Type='STANDARD'|'CONTROL', Persistence='PERSISTENT'|'NON_PERSISTENT', Metadata='string', ClientRequestToken='string', ChimeBearer='string' )
- Parameters:
ChannelArn (string) –
[REQUIRED]
The ARN of the channel.
Content (string) –
[REQUIRED]
The content of the message.
Type (string) –
[REQUIRED]
The type of message,
STANDARD
orCONTROL
.Persistence (string) –
[REQUIRED]
Boolean that controls whether the message is persisted on the back end. Required.
Metadata (string) – The optional metadata for each message.
ClientRequestToken (string) –
[REQUIRED]
The
Idempotency
token for each client request.This field is autopopulated if not provided.
ChimeBearer (string) – The
AppInstanceUserArn
of the user that makes the API call.
- Return type:
dict
- Returns:
Response Syntax
{ 'ChannelArn': 'string', 'MessageId': 'string' }
Response Structure
(dict) –
ChannelArn (string) –
The ARN of the channel.
MessageId (string) –
The ID string assigned to each message.
Exceptions