Use case
The 2FA Messaging API lets you send time-sensitive authentication codes (2FA) to your users and verify the codes they enter. This ensures that only legitimate users can access your services.
Key Roles
UserService – Your service or application that uses the API to authenticate users.
API – The Bind 2FA Messaging API.
Recipient – The end user of your mobile application who owns a valid phone number.
Flow diagram

How the 2FA Flow Works
Step-by-Step Process
Recipient starts verification The Recipient opens your mobile application (UserService) and starts the 2FA verification process.
UserService requests a 2FA code The UserService sends a request to the API using
POST /api/v1.0/2fa/request
.The API responds with a
request_id
that uniquely identifies this attempt.Example response:
{ "status": "ACCEPTED", "request_id": "uuid", "error_message": "OK" }
API delivers the 2FA code The API generates and sends the 2FA code to the Recipient via SMS or another messaging channel.
Recipient enters the code The Recipient types the received 2FA code into the UserService mobile interface.
UserService validates the code The UserService calls
POST /api/v1.0/2fa/validate
with the entered code and therequest_id
.Example request:
{ "code": "123456", "request_id": "uuid" }
If the code is correct, the API responds:
{ "verified": true, "status": "success" }
Verification complete The UserService confirms that the Recipient has been successfully authenticated.
What’s Next
You now understand how to authenticate users using the Bind 2FA Messaging API. Continue to the next section of the documentation to explore the API endpoints that support this flow.
Last updated