PinpointSMSVoiceV2.Client.
send_text_message
(**kwargs)¶Creates a new text message and sends it to a recipient's phone number.
SMS throughput limits are measured in Message Parts per Second (MPS). Your MPS limit depends on the destination country of your messages, as well as the type of phone number (origination number) that you use to send the message. For more information, see Message Parts per Second (MPS) limits in the Amazon Pinpoint User Guide .
See also: AWS API Documentation
Request Syntax
response = client.send_text_message(
DestinationPhoneNumber='string',
OriginationIdentity='string',
MessageBody='string',
MessageType='TRANSACTIONAL'|'PROMOTIONAL',
Keyword='string',
ConfigurationSetName='string',
MaxPrice='string',
TimeToLive=123,
Context={
'string': 'string'
},
DestinationCountryParameters={
'string': 'string'
},
DryRun=True|False
)
[REQUIRED]
The destination phone number in E.164 format.
You can specify custom data in this field. If you do, that data is logged to the event destination.
This field is used for any country-specific registration requirements. Currently, this setting is only used when you send messages to recipients in India using a sender ID. For more information see Special requirements for sending SMS messages to recipients in India.
dict
Response Syntax
{
'MessageId': 'string'
}
Response Structure
(dict) --
MessageId (string) --
The unique identifier for the message.
Exceptions
PinpointSMSVoiceV2.Client.exceptions.ServiceQuotaExceededException
PinpointSMSVoiceV2.Client.exceptions.ThrottlingException
PinpointSMSVoiceV2.Client.exceptions.AccessDeniedException
PinpointSMSVoiceV2.Client.exceptions.ResourceNotFoundException
PinpointSMSVoiceV2.Client.exceptions.ValidationException
PinpointSMSVoiceV2.Client.exceptions.ConflictException
PinpointSMSVoiceV2.Client.exceptions.InternalServerException