EndUserMessaging / Client / validate_notify_code_verification

validate_notify_code_verification

EndUserMessaging.Client.validate_notify_code_verification(**kwargs)

Validates a one-time passcode that a recipient submitted. Validation succeeds when the passcode matches, the validity period has not elapsed, and the maximum number of attempts has not been exceeded.

See also: AWS API Documentation

Request Syntax

response = client.validate_notify_code_verification(
    destinationIdentity='string',
    referenceId='string',
    code='string'
)
Parameters:
  • 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.

  • referenceId (string) – The caller-supplied reference identifier used to locate the verification. This value must match the value that you supplied to the SendNotifyCodeVerification operation.

  • code (string) –

    [REQUIRED]

    The one-time passcode that the recipient submitted for validation.

Return type:

dict

Returns:

Response Syntax

{
    'status': 'VALID'|'INVALID'
}

Response Structure

  • (dict) –

    • status (string) –

      The outcome of the validation attempt. VALID indicates that the submitted passcode matched an active verification. INVALID indicates that the passcode did not match, expired, or exceeded its attempt limit.

Exceptions