Skip to content

/AWS1/IF_PPU=>SENDNOTIFYCODEVERIFICATION()

About SendNotifyCodeVerification

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.

Method Signature

METHODS /AWS1/IF_PPU~SENDNOTIFYCODEVERIFICATION
  IMPORTING
    !IV_CHANNEL TYPE /AWS1/PPUNOTIFYCHANNEL OPTIONAL
    !IV_DESTINATIONIDENTITY TYPE /AWS1/PPUDESTINATIONIDENTITY OPTIONAL
    !IV_ORIGINATIONIDENTITY TYPE /AWS1/PPUORIGINATIONIDENTITY OPTIONAL
    !IV_NOTIFYCODECONFIGURATION TYPE /AWS1/PPUNOTIFYCODECONFIDORARN OPTIONAL
    !IO_OVERRIDECHANNELPARAMETERS TYPE REF TO /AWS1/CL_PPUCHANNELPARAMETERS OPTIONAL
    !IO_OVERRIDECODECONFPARAMS TYPE REF TO /AWS1/CL_PPUCODECONFPARAMETERS OPTIONAL
    !IV_CONFIGURATIONSETNAME TYPE /AWS1/PPUCONFIGURATIONSETNAME OPTIONAL
    !IT_CONTEXT TYPE /AWS1/CL_PPUCONTEXTMAP_W=>TT_CONTEXTMAP OPTIONAL
    !IV_REFERENCEID TYPE /AWS1/PPUREFERENCEID OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ppusendntfcodeverfout
  RAISING
    /AWS1/CX_PPUACCESSDENIEDEX
    /AWS1/CX_PPUCONFLICTEXCEPTION
    /AWS1/CX_PPUINTERNALSERVEREX
    /AWS1/CX_PPURESOURCENOTFOUNDEX
    /AWS1/CX_PPUSERVICEQUOTAEXCDEX
    /AWS1/CX_PPUTHROTTLINGEX
    /AWS1/CX_PPUVLDTNEXCEPTION
    /AWS1/CX_PPUCLIENTEXC
    /AWS1/CX_PPUSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_channel TYPE /AWS1/PPUNOTIFYCHANNEL /AWS1/PPUNOTIFYCHANNEL

The channel used to deliver the one-time passcode to the recipient.

iv_destinationidentity TYPE /AWS1/PPUDESTINATIONIDENTITY /AWS1/PPUDESTINATIONIDENTITY

The recipient identifier. For the TEXT and VOICE channels, specify an E.164 phone number. For the WhatsApp channel, specify a WhatsApp address.

iv_originationidentity TYPE /AWS1/PPUORIGINATIONIDENTITY /AWS1/PPUORIGINATIONIDENTITY

The identity used to send the message, such as a phone number, sender ID, or pool that is owned by your account.

Optional arguments:

iv_notifycodeconfiguration TYPE /AWS1/PPUNOTIFYCODECONFIDORARN /AWS1/PPUNOTIFYCODECONFIDORARN

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.

io_overridechannelparameters TYPE REF TO /AWS1/CL_PPUCHANNELPARAMETERS /AWS1/CL_PPUCHANNELPARAMETERS

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.

io_overridecodeconfparams TYPE REF TO /AWS1/CL_PPUCODECONFPARAMETERS /AWS1/CL_PPUCODECONFPARAMETERS

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.

iv_configurationsetname TYPE /AWS1/PPUCONFIGURATIONSETNAME /AWS1/PPUCONFIGURATIONSETNAME

The name of the configuration set used to control how delivery events for the message are handled.

it_context TYPE /AWS1/CL_PPUCONTEXTMAP_W=>TT_CONTEXTMAP TT_CONTEXTMAP

A map of custom key and value pairs that are propagated to the delivery events for this verification.

iv_referenceid TYPE /AWS1/PPUREFERENCEID /AWS1/PPUREFERENCEID

A caller-supplied reference identifier that binds a send request to a later validate request. Specify the same value in both requests.

RETURNING

oo_output TYPE REF TO /aws1/cl_ppusendntfcodeverfout /AWS1/CL_PPUSENDNTFCODEVERFOUT

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->sendnotifycodeverification(
  io_overridechannelparameters = new /aws1/cl_ppuchannelparameters(
    io_notify = new /aws1/cl_ppunotifyparameters(
      iv_notifytemplateid = |string|
      iv_voiceid = |string|
    )
    io_text = new /aws1/cl_pputextparameters(
      it_dstcountryparameters = VALUE /aws1/cl_ppudstcountryparams_w=>tt_dstcountryparameters(
        (
          VALUE /aws1/cl_ppudstcountryparams_w=>ts_dstcountryparameters_maprow(
            key = |string|
            value = new /aws1/cl_ppudstcountryparams_w( |string| )
          )
        )
      )
      iv_inlinetemplatebody = |string|
    )
    io_voice = new /aws1/cl_ppuvoiceparameters(
      iv_inlinetemplatebody = |string|
      iv_languagecode = |string|
      iv_voiceid = |string|
      iv_voicemessagebodytexttype = |string|
    )
    io_whatsapp = new /aws1/cl_ppuwhatsappparameters(
      iv_languagecode = |string|
      iv_whatsapptemplatename = |string|
    )
  )
  io_overridecodeconfparams = new /aws1/cl_ppucodeconfparameters(
    iv_codelength = 123
    iv_codetype = |string|
    iv_maxattempts = 123
    iv_validityperiodminutes = 123
  )
  it_context = VALUE /aws1/cl_ppucontextmap_w=>tt_contextmap(
    (
      VALUE /aws1/cl_ppucontextmap_w=>ts_contextmap_maprow(
        key = |string|
        value = new /aws1/cl_ppucontextmap_w( |string| )
      )
    )
  )
  iv_channel = |string|
  iv_configurationsetname = |string|
  iv_destinationidentity = |string|
  iv_notifycodeconfiguration = |string|
  iv_originationidentity = |string|
  iv_referenceid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_verificationid = lo_result->get_verificationid( ).
  lv_messageid = lo_result->get_messageid( ).
ENDIF.

Send a one-time passcode over SMS

Send a one-time passcode over SMS

DATA(lo_result) = lo_client->sendnotifycodeverification(
  iv_channel = |TEXT|
  iv_destinationidentity = |+14255550100|
  iv_notifycodeconfiguration = |ncc-abc12345678901234|
  iv_originationidentity = |arn:aws:sms-voice:us-east-1:123456789012:phone-number/pn-abc123|
  iv_referenceid = |signup-flow-42|
).