📝 User Journey
noOTP Login For Websites & Apps
WAuth offers two options for businesses to enable a 'Login with WhatsApp' interface on their websites and mobile apps.
::: note
Q: How is Login with WhatsApp' different from 'Login Using Google / Facebook'?
Login with WhatsApp is similar to Login Using Google/ Facebook. The difference is that for verification of phone number we do not need access to user's contacts, content or any WhatsApp settings. Thus is far safer for end users.
:::
Approach 1: QR Scan Based Login
This approach simplifies login on websites accessed from laptops or desktops. The user journey is as follows:
The business hits WAuth's Init API to generate a QR Code URL (qrURL).
The business displays the generated QR on the website by pasting the URL inside an
<img>
tag.The user scans the QR code using a mobile camera or QR code scanner app.
The user is asked to confirm if the WhatsApp application needs to be opened on the mobile phone.
The user confirms the login attempt by submitting a message to a pre-rendered WhatsApp chat window.
A webhook request is triggered to the business, which can notify the user of the verification confirmation or poll WAuth's Verify Endpoint to confirm the verification status and grant access to the user.
Sequence flow
sequenceDiagram
participant Business
participant WAuth
participant User
Business->>WAuth: Init API for QR Code URL
WAuth->>Business: Returns QR Code URL
Business->>User: Displays QR Code
User->>WAuth: Scans QR Code
WAuth->>User: Asks to open WhatsApp
User->>WAuth: Confirms login
WAuth->>Business: Triggers webhook for verification
Business->>WAuth: Polls Verify Endpoint
Business-->>User: Grants access
::: tip
Try opening below URL using a Desktop or laptop for Live Demo https://wauth.in/API-V2/Index.php.
:::
Approach 2: Link Redirection Based Login
This approach simplifies login on mobile apps or mobile sites accessed from smartphones. The user journey is as follows:
The business hits WAuth's Init API to generate a Redirection URL (appURL).
The business displays the 'Login With WhatsApp' button on the app, and on click, redirects the user to appURL.
The user is asked to confirm if the WhatsApp application needs to be opened on the mobile phone.
The user confirms the login attempt by submitting a message to a pre-rendered WhatsApp chat window.
A webhook request is triggered to the business, which can notify the user of the verification confirmation or poll WAuth's Verify Endpoint to confirm the verification status and grant access to the user.
Sequence flow
sequenceDiagram
participant Business
participant WAuth
participant User
Business->>WAuth: Init API for Redirection URL
WAuth->>Business: Returns Redirection URL
Business->>User: Displays 'Login with WhatsApp' button
User->>WAuth: Clicks 'Login with WhatsApp' button
WAuth->>User: Asks to open WhatsApp
User->>WAuth: Confirms login
WAuth->>Business: Triggers webhook for verification
Business->>WAuth: Polls Verify Endpoint
Business-->>User: Grants access
::: tip
Try opening below URL using a Smartphone for Live Demo https://wauth.in/API-V2/Index.php.
:::