Node.js
Testing the Backend
Start the server:
node server.js
Open a new terminal and use cURL to send a request to the /verification endpoint. The request must include the phone number in the body:
curl -X POST http://localhost:4000/verification \
-H "Content-Type: application/json" \
-d '{"phone":"+34600000000"}'
The request should return a 200 Ok response containing the request_id and the check_url. At this point we could use cURL again to send the check_url:
curl -L https://api-eu-4.vonage.com/v2/verify/aaa-bbb-cccc-dddd/silent-auth/redirect
The backend is now ready to be called from the mobile app. Next, we’ll build the Android client to complete the full 2FA flow.
Getting Started with Silent Authentication
Silent Authentication takes quite a bit to understand. This tutorial shows you how to build an integration from scratch with Nodejs and Kotlin
Available on:
Steps
1
Introduction2
Before you start3
Initialize the Project4
Create a Simple Express Server5
Setting up Vonage credentials6
Add the Vonage Verify API7
Testing the Backend8
Create New Android Project9
Set up app Android dependencies10
Set up import and constants11
Create Mobile UI12
Networking to Backend13
Testing Full Flow