send_message
¶
send_message(
content_type: ChatContentType,
content: ChatContent,
connection_token: ParticipantToken,
*,
config_overrides: Optional[ConnectParticipantClientConfig] = None,
client_token: Optional[ClientToken] = None,
) -> SendMessageResponse
Sends a message.
For security recommendations, see Connect Customer Chat security best practices.
ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
Parameters:
-
content_type(ChatContentType) –The type of the content. Possible types are
text/plain,text/markdown,application/json, andapplication/vnd.amazonaws.connect.message.interactive.response.Supported types on the contact are configured through
SupportedMessagingContentTypeson StartChatContact and StartOutboundChatContact.For Apple Messages for Business, SMS, and WhatsApp Business Messaging contacts, only
text/plainis supported. -
content(ChatContent) –The content of the message. Maximum of 16,384 bytes for all content types (
text/plain,text/markdown,application/json, andapplication/vnd.amazonaws.connect.message.interactive.response).Some messaging channels enforce lower limits. For channel-specific message size limits, see Chat message size limits by channel in the Amazon Connect Customer Administrator Guide.
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
-
connection_token(ParticipantToken) –The authentication token associated with the connection.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
InternalServerException–This exception occurs when there is an internal failure in the Amazon Connect service.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input fails to satisfy the constraints specified by Amazon Connect.
-
UnknownServiceError–The service returned an error code this client does not model.