Interface OTP.WhatsAppOTP

  • All Implemented Interfaces:

    
    public interface OTP.WhatsAppOTP
    
                        

    Provides all possible ways to call WhatsApp OTP endpoints

    • Constructor Detail

    • Method Detail

      • loginOrCreate

         abstract StytchResult<LoginOrCreateOTPData> loginOrCreate(OTP.WhatsAppOTP.Parameters parameters)

        Send a one-time passcode (OTP) to a user using their phone number via WhatsApp. If the phone number is not associated with a user already, a user will be created.

        Parameters:
        parameters - required to receive a WhatsApp OTP
        Returns:

        BaseResponse

      • loginOrCreate

         abstract Unit loginOrCreate(OTP.WhatsAppOTP.Parameters parameters, Function1<StytchResult<LoginOrCreateOTPData>, Unit> callback)

        Send a one-time passcode (OTP) to a user using their phone number via WhatsApp. If the phone number is not associated with a user already, a user will be created.

        Parameters:
        parameters - required to receive a WhatsApp OTP
        callback - a callback that receives a LoginOrCreateOTPResponse
      • loginOrCreateCompletable

         abstract CompletableFuture<StytchResult<LoginOrCreateOTPData>> loginOrCreateCompletable(OTP.WhatsAppOTP.Parameters parameters)

        Send a one-time passcode (OTP) to a user using their phone number via WhatsApp. If the phone number is not associated with a user already, a user will be created.

        Parameters:
        parameters - required to receive a WhatsApp OTP
        Returns:

        BaseResponse

      • send

         abstract StytchResult<OTPSendResponseData> send(OTP.WhatsAppOTP.Parameters parameters)

        Send a one-time passcode (OTP) to a user's phone number via WhatsApp. If you'd like to create a user and send them a passcode with one request, use our loginOrCreate method.

        Parameters:
        parameters - required to send OTP
        Returns:

        OTPSendResponse

      • send

         abstract Unit send(OTP.WhatsAppOTP.Parameters parameters, Function1<StytchResult<OTPSendResponseData>, Unit> callback)

        Send a one-time passcode (OTP) to a user's phone number via WhatsApp. If you'd like to create a user and send them a passcode with one request, use our loginOrCreate method.

        Parameters:
        parameters - required to send OTP
        callback - a callback that receives a OTPSendResponse