CustomOneTimePasswordDeliveryResult Enum

Indicates the status of an attempt to send a one-time password (OTP) to an external user via a custom messaging provider.

To use this feature, contact Salesforce Customer Support.

This enum specifies the result of the sendOneTimePassword method in an implementation of the Auth.CustomOneTimePasswordDeliveryHandler interface.

The following are the values of the Auth.CustomOneTimePasswordDeliveryResult enum.

ValueDescription
COUNTRY_BLOCKIndicates that the user’s phone number has a country code that Salesforce doesn’t support.
EXCEPTIONIndicates that the handler threw an exception.
INVALID_PHONE_NUMBERIndicates that the user’s phone number isn’t valid. For example, it’s in the wrong format or contains characters that aren’t numbers.
MESSAGE_LIMIT_EXCEEDEDIndicates that your Experience Cloud site reached the message limit allowed by your license.
PROVIDER_ERRORIndicates an error with the custom OTP service.
SUCCESSIndicates that the OTP message was successfully sent to the user.