Interface OTP.SmsOTP
-
- All Implemented Interfaces:
public interface OTP.SmsOTPProvides all possible ways to call SMS OTP endpoints
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classOTP.SmsOTP.ParametersData class used for wrapping parameters used with SMS OTP
-
Method Summary
Modifier and Type Method Description abstract StytchResult<LoginOrCreateOTPData>loginOrCreate(OTP.SmsOTP.Parameters parameters)Send a one-time passcode (OTP) to a user using their phone number via SMS. abstract UnitloginOrCreate(OTP.SmsOTP.Parameters parameters, Function1<StytchResult<LoginOrCreateOTPData>, Unit> callback)Send a one-time passcode (OTP) to a user using their phone number via SMS. abstract CompletableFuture<StytchResult<LoginOrCreateOTPData>>loginOrCreateCompletable(OTP.SmsOTP.Parameters parameters)Send a one-time passcode (OTP) to a user using their phone number via SMS. abstract StytchResult<OTPSendResponseData>send(OTP.SmsOTP.Parameters parameters)Send a one-time passcode (OTP) to a user's phone number via SMS. abstract Unitsend(OTP.SmsOTP.Parameters parameters, Function1<StytchResult<OTPSendResponseData>, Unit> callback)Send a one-time passcode (OTP) to a user's phone number via SMS. abstract CompletableFuture<StytchResult<OTPSendResponseData>>sendCompletable(OTP.SmsOTP.Parameters parameters)Send a one-time passcode (OTP) to a user's phone number via SMS. -
-
Method Detail
-
loginOrCreate
abstract StytchResult<LoginOrCreateOTPData> loginOrCreate(OTP.SmsOTP.Parameters parameters)
Send a one-time passcode (OTP) to a user using their phone number via SMS. If the phone number is not associated with a user already, a user will be created.
- Parameters:
parameters- required to receive a SMS OTP- Returns:
LoginOrCreateOTPResponse
-
loginOrCreate
abstract Unit loginOrCreate(OTP.SmsOTP.Parameters parameters, Function1<StytchResult<LoginOrCreateOTPData>, Unit> callback)
Send a one-time passcode (OTP) to a user using their phone number via SMS. If the phone number is not associated with a user already, a user will be created.
- Parameters:
parameters- required to receive a SMS OTPcallback- a callback that receives a LoginOrCreateOTPResponse
-
loginOrCreateCompletable
abstract CompletableFuture<StytchResult<LoginOrCreateOTPData>> loginOrCreateCompletable(OTP.SmsOTP.Parameters parameters)
Send a one-time passcode (OTP) to a user using their phone number via SMS. If the phone number is not associated with a user already, a user will be created.
- Parameters:
parameters- required to receive a SMS OTP- Returns:
LoginOrCreateOTPResponse
-
send
abstract StytchResult<OTPSendResponseData> send(OTP.SmsOTP.Parameters parameters)
Send a one-time passcode (OTP) to a user's phone number via SMS. 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.SmsOTP.Parameters parameters, Function1<StytchResult<OTPSendResponseData>, Unit> callback)
Send a one-time passcode (OTP) to a user's phone number via SMS. 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 OTPcallback- a callback that receives a OTPSendResponse
-
sendCompletable
abstract CompletableFuture<StytchResult<OTPSendResponseData>> sendCompletable(OTP.SmsOTP.Parameters parameters)
Send a one-time passcode (OTP) to a user's phone number via SMS. 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
-
-
-
-