2Factor Authentication - India

FREE
By motp
Updated 5 months ago
Communication
0.3/10
Popularity Score
95ms
Latency
-
Success Rate

2Factor Authentication - India API Documentation

2Factor.in provides extremely simple to use APIs for implementing 2Factor Authentication ( Phone verification ) with just 1 API Call. Best Part of 2Factor.in solution is its Fast, Reliable & Economical too.

View API Details
VOICE OTP
GETSending Voice OTP ( Custom OTP )
GETCheck Voice Balance
GETSending VOICE OTP ( Auto Generated OTP )
GETVerify VOICE OTP Input
SMS OTP
GETSending SMS OTP ( Custom OTP )
GETCheck SMS Balance
GETSending SMS OTP ( Auto Generated OTP )
GETVerify SMS OTP Input
GETSending SMS OTP ( Auto Generated OTP - Custom Template )
GETSending SMS OTP ( Custom OTP - Custom Template )
ADDON SERVICES
GETCheck Balance - Addon Services
POSTSend Transactional SMS
GETPull Delivery Report
BLOCKLIST MANAGEMENT
GETBlock Number - SMS Service
GETUn-Block Number - SMS Service
GETBlock Number - VOICE Service
GETUn-Block Number - VOICE Service
GETSending Voice OTP ( Custom OTP )

This endpoint is used to send VOICE OTP to India

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
phone_numberSTRING
REQUIRED10 Digit Indian Phone Number
api_keySTRING
REQUIREDAPI Obtained From 2Factor.in
otpNUMBER
REQUIRED4 Digit ( Numeric ) OTP code to be sent
Code Snippet
unirest.get("https://2factor.p.rapidapi.com/API/V1/293832-67745-11e5-88de-5600000c6b13/VOICE/9911991199/4499")
.header("X-RapidAPI-Host", "2factor.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://2factor.p.rapidapi.com/API/V1/{api_key}/VOICE/{phone_number}/{otp}
Request Method: GET
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://2factor.p.rapidapi.com/API/V1/293832-67745-11e5-88de-5600000c6b13/VOICE/9911991199/4499")
.header("X-RapidAPI-Host", "2factor.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication