EndUserMessaging / Client / send_notify_code_verification
send_notify_code_verification¶
- EndUserMessaging.Client.send_notify_code_verification(**kwargs)¶
Generates a one-time passcode and delivers it to a recipient over the requested channel. The passcode policy is captured from the referenced notify code configuration at the time of the request, so later updates to the configuration do not affect verifications that are already in progress.
See also: AWS API Documentation
Request Syntax
response = client.send_notify_code_verification( channel='TEXT'|'VOICE'|'WHATSAPP', destinationIdentity='string', originationIdentity='string', notifyCodeConfiguration='string', overrideChannelParameters={ 'text': { 'inlineTemplateBody': 'string', 'destinationCountryParameters': { 'string': 'string' } }, 'voice': { 'inlineTemplateBody': 'string', 'languageCode': 'string', 'voiceId': 'string', 'voiceMessageBodyTextType': 'TEXT'|'SSML' }, 'notify': { 'notifyTemplateId': 'string', 'voiceId': 'string' }, 'whatsApp': { 'whatsAppTemplateName': 'string', 'languageCode': 'string' } }, overrideCodeConfigurationParameters={ 'codeType': 'NUMERIC'|'ALPHA'|'ALPHANUMERIC', 'codeLength': 123, 'validityPeriodMinutes': 123, 'maxAttempts': 123 }, configurationSetName='string', context={ 'string': 'string' }, referenceId='string' )
- Parameters:
channel (string) –
[REQUIRED]
The channel used to deliver the one-time passcode to the recipient.
destinationIdentity (string) –
[REQUIRED]
The recipient identifier. For the TEXT and VOICE channels, specify an E.164 phone number. For the WhatsApp channel, specify a WhatsApp address.
originationIdentity (string) –
[REQUIRED]
The identity used to send the message, such as a phone number, sender ID, or pool that is owned by your account.
notifyCodeConfiguration (string) – The identifier or Amazon Resource Name (ARN) of the notify code configuration that supplies the passcode policy and template defaults. When you do not specify a configuration, you must supply the template in the request.
overrideChannelParameters (dict) –
The channel-specific parameters used to render and deliver the one-time passcode for this request. The route that is derived from the channel and the origination identity selects the matching channel. When you do not specify channel parameters, the service uses the parameters from the referenced notify code configuration.
text (dict) –
The parameters for the text channel, which delivers over SMS or RCS.
inlineTemplateBody (string) –
The freeform message template used to render the one-time passcode for the SMS or RCS channels. The template must contain the code placeholder.
destinationCountryParameters (dict) –
A map of country-specific parameters that control one-time passcode delivery.
(string) –
Key of a
DestinationCountryParametersmap entry. Up to 64 non-whitespace characters.(string) –
Value of a
DestinationCountryParametersmap entry. Up to 64 non-whitespace characters.
voice (dict) –
The parameters for the voice channel.
inlineTemplateBody (string) –
The freeform message template used to render the one-time passcode for the voice channel. The template must contain the code placeholder.
languageCode (string) –
The BCP 47 language code used to render the voice message.
voiceId (string) –
The Amazon Polly voice ID used for the voice channel.
voiceMessageBodyTextType (string) –
The format of the voice message body. Valid values are TEXT and SSML.
notify (dict) –
The parameters for the preapproved notify-template route over the SMS or voice channels.
notifyTemplateId (string) –
The identifier of a preapproved notify template for the SMS or voice channels.
voiceId (string) –
The Amazon Polly voice ID used when the notify template is delivered over the voice channel.
whatsApp (dict) –
The parameters for the WhatsApp channel.
whatsAppTemplateName (string) –
The name of the Meta-approved WhatsApp authentication template.
languageCode (string) –
The BCP 47 language code used to render the template. This value is required for the WhatsApp channel.
overrideCodeConfigurationParameters (dict) –
The per-send overrides for the passcode policy parameters, including the code type, length, validity period, and maximum number of attempts. These values override the values from the referenced notify code configuration. When you do not specify a value, the value from the configuration is used, and if neither is set, the service default applies.
codeType (string) –
The character set used to generate the one-time passcode. Valid values are NUMERIC (digits only), ALPHA (uppercase letters only), and ALPHANUMERIC (uppercase letters and digits). When you do not specify a value, the default is applied when a passcode is sent.
codeLength (integer) –
The number of characters in the one-time passcode. Valid values range from 4 through 8. When you do not specify a value, the default is applied when a passcode is sent.
validityPeriodMinutes (integer) –
The length of time, in minutes, that the one-time passcode remains valid. Valid values range from 1 through 60. When you do not specify a value, the default is applied when a passcode is sent.
maxAttempts (integer) –
The maximum number of validation attempts that are allowed before the verification is locked. Valid values range from 1 through 5. When you do not specify a value, the default is applied when a passcode is sent.
configurationSetName (string) – The name of the configuration set used to control how delivery events for the message are handled.
context (dict) –
A map of custom key and value pairs that are propagated to the delivery events for this verification.
(string) –
Caller-supplied context propagated to delivery events for this verification.
(string) –
Caller-supplied context value. Blank space is not allowed at the front or end.
referenceId (string) – A caller-supplied reference identifier that binds a send request to a later validate request. Specify the same value in both requests.
- Return type:
dict
- Returns:
Response Syntax
{ 'verificationId': 'string', 'messageId': 'string' }
Response Structure
(dict) –
verificationId (string) –
The service-generated identifier for the verification.
messageId (string) –
The service-generated identifier for the message that delivers the one-time passcode.
Exceptions