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 the AppInstanceUserArn
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.
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'
)
[REQUIRED]
The ARN of the channel.
[REQUIRED]
The content of the message.
[REQUIRED]
The type of message, STANDARD
or CONTROL
.
[REQUIRED]
Boolean that controls whether the message is persisted on the back end. Required.
[REQUIRED]
The Idempotency
token for each client request.
This field is autopopulated if not provided.
AppInstanceUserArn
of the user that makes the API call.dict
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
Chime.Client.exceptions.BadRequestException
Chime.Client.exceptions.ConflictException
Chime.Client.exceptions.ForbiddenException
Chime.Client.exceptions.UnauthorizedClientException
Chime.Client.exceptions.ThrottledClientException
Chime.Client.exceptions.ServiceUnavailableException
Chime.Client.exceptions.ServiceFailureException