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-bearerrequest header is mandatory. Use the- AppInstanceUserArnof the user that makes the API call as the value in the header.- Also, - STANDARDmessages can contain 4KB of data and the 1KB of metadata.- CONTROLmessages 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' ) - Parameters:
- ChannelArn (string) – - [REQUIRED] - The ARN of the channel. 
- Content (string) – - [REQUIRED] - The content of the message. 
- Type (string) – - [REQUIRED] - The type of message, - STANDARDor- CONTROL.
- 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 - Idempotencytoken for each client request.- This field is autopopulated if not provided. 
- ChimeBearer (string) – The - AppInstanceUserArnof 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 - 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