- Sign-in. Use our Server SDKs to authenticate users with SMS as the 1st factor. This integration only requires a phone number to initiate.
- Adaptive MFA. Use Server SDKs together with Client SDKs to authenticate users with SMS as a secondary factor. This integration requires a user ID to initiate and assumes the user has already been authenticated with a primary factor.
SMS provider setup
Navigate to Authenticators in the Authsignal Portal, click on SMS OTP, and choose an SMS provider.
- Bird
- Twilio
- MessageMedia
- TNZ
- Modica Group
- Webhook
- Log in to your Bird account
- Get your Access key from your Bird account settings
- Note your Workspace ID from your workspace settings
- Create or locate an SMS channel and note the Channel ID
- In the Authsignal Portal, select Bird as your SMS provider
- Enter your Bird access key, workspace ID, and channel ID
Custom variables
When you deliver SMS codes using the Webhook provider, you can include custom data points in thesms.created webhook payload, such as a user’s account ID or a transaction amount.
This is only supported for webhook delivery. Custom data points aren’t included in messages sent through a hosted SMS provider.
To configure this, navigate to your SMS OTP settings in the Authsignal Portal and select which custom data points to include under Custom variables.
Custom data points are prefixed by model type:
- User data points are prefixed with
user_(e.g.user_accountId) - Action data points are prefixed with
action_(e.g.action_transactionAmount)
Custom data points must be registered in the Authsignal Portal before they can be selected.
Only registered data points with values set on the user or action will be included.
SDK setup
Server SDK
Initialize the SDK using your secret key from the API keys page and the API URL for your region.Client SDK
Initialize the Web SDK or Mobile SDK using your tenant ID from the API keys page and your API URL.Sign-in
Scenario - Let users sign-in with SMS OTP as the 1st factor.
1. Initiate challenge
Call Initiate Challenge to send an OTP to a phone number.2. Verify challenge
Once the user inputs the OTP code, call Verify Challenge to verify it.3. Claim challenge
Now that the challenge has been verified, you can lookup the user in your IdP or DB based on their phone number. For passwordless flows with a combined sign-up and sign-in UX, you may need to create the user at this point if no account exists. Then claim the challenge once you know the primary user ID associated with the phone number.Adaptive MFA
Scenario - Challenge users with SMS OTP as a 2nd factor and use rules to decide when and
where in your app to trigger the challenge.
1. Track action
Use a Server SDK to track an action in your backend. This step can apply rules to determine if a challenge is required.signIn or createPayment).
Each action can have its own set of rules.
To learn more about using rules and handling different action states refer to our documentation on actions and rules.
2. Present challenge
If the action state isCHALLENGE_REQUIRED then you can present an SMS OTP challenge using the Web SDK or Mobile SDK.
- Custom UI
- Pre-built UI
3. Validate action
Use the new token obtained from the client SDK to validate the action on your backend.Enrollment
Scenario - Enroll users in SMS OTP while they’re authenticated so it can be used later as a
method for adaptive MFA.
1. Initiate challenge
Call Initiate Challenge to send an OTP to a phone number.2. Verify challenge
Once the user inputs the OTP code, call Verify Challenge to verify it.Update phone number
Scenario - Let users update their phone number while they’re authenticated, completing an OTP
challenge to verify the new number.
1. Initiate challenge
Call Initiate Challenge to send an OTP to the user’s new phone number.2. Verify challenge
Once the user inputs the OTP code, call Verify Challenge to verify it.Verified phone numbers
Scenario - Enroll or update an SMS authenticator for a user when you’ve already verified their
phone number in another system, so it can be used later as a method for adaptive MFA.
Next steps
- Pre-built UI - Rapidly deploy SMS OTP challenges using our pre-built UI
- Web SDK - Implement SMS OTP challenges while building your own UI
- Mobile SDK - Implement SMS OTP challenges in native mobile apps
- Adaptive MFA - Set up smart rules to trigger authentication based on risk
- Opt-in consent - Collect user consent before sending SMS messages
- Passkeys - Offer the most secure and user-friendly passwordless authentication

