Class SmsWorkflow

All Implemented Interfaces:
Jsonable

public final class SmsWorkflow extends Workflow
Defines workflow properties for sending a verification code to a user via SMS.
  • Constructor Details

    • SmsWorkflow

      public SmsWorkflow(String to)
      Constructs a new SMS verification workflow.
      Parameters:
      to - The number to send the message to, in E.164 format.
    • SmsWorkflow

      @Deprecated public SmsWorkflow(String to, String appHash)
      Deprecated.
      Constructs a new SMS verification workflow.
      Parameters:
      to - The number to send the message to, in E.164 format.
      appHash - Android Application Hash Key for automatic code detection on a user's device.
    • SmsWorkflow

      @Deprecated public SmsWorkflow(String to, String from, String appHash)
      Deprecated.
      Use builder(String) instead.
      Constructs a new SMS verification workflow.
      Parameters:
      to - The number to send the message to, in E.164 format.
      from - The number or sender ID to send the SMS from.
      appHash - Android Application Hash Key for automatic code detection on a user's device.
      Since:
      8.1.0
  • Method Details

    • validateFrom

      protected String validateFrom(String from)
      Overrides:
      validateFrom in class Workflow
    • getAppHash

      public String getAppHash()
      Android Application Hash Key for automatic code detection on a user's device.
      Returns:
      The Android application hash key (11 characters in length), or null if not set.
    • getFrom

      public String getFrom()
      The number or sender ID the message will be sent from.
      Returns:
      The sender phone number or sender ID, or null if unspecified.
      Since:
      8.1.0
    • getContentId

      public String getContentId()
      Optional value corresponding to a TemplateID for SMS delivery using Indian Carriers.
      Returns:
      The content ID, or null if unspecified.
      Since:
      8.2.0
    • getEntityId

      public String getEntityId()
      Optional PEID required for SMS delivery using Indian Carriers.
      Returns:
      The entity ID, or null if unspecified.
      Since:
      8.2.0
    • builder

      public static SmsWorkflow.Builder builder(String to)
      Entrypoint for constructing an instance of this class.
      Parameters:
      to - (REQUIRED) The destination phone number in E.164 format.
      Returns:
      A new Builder.
      Since:
      8.2.0
    • validateTo

      protected String validateTo(String to)
      Overrides:
      validateTo in class Workflow