Server OTP Service API

URL : https://otp.inforvation.systems

URL METHOD Desc Detail
/sms/request POST Send Request OTP to Mobile Phone Click
/sms/verify POST Send Request to Verify OTP Click

Send Request OTP to Mobile Phone

URL : https://otp.inforvation.systems/sms/request


const axios = require('axios');
let data = JSON.stringify({
  "phone_number": "0633919229"
});

let config = {
  method: 'post',
  url: 'https://otp.inforvation.systems/sms/request',
  headers: { 
    'Content-Type': 'application/json',
    'Authorization': 'JWT token'
  },
  data : data
};

axios(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

Response Example

status(200)
{
  'ok': true,
  'msg': {
    "secret": "XXXXXXXXXXXXX",
    "ref": "XXXXX"
  }
}


status(400)
{
  'ok': false,
  'msg': 'phone number is required'
}

Back to Top

Send Request to Verify OTP

URL : https://otp.inforvation.systems/sms/verify

const axios = require('axios');
let data = JSON.stringify({
  "secret": "c47d0b564ec30883596e0905b9adfbc9c1cbe63c50be7a90f075276966a70fbe.1636055524516",
  "phone_number": "0633919229",
  "otp": "300624"
});

let config = {
  method: 'post',
  url: 'https://otp.inforvation.systems/sms/verify',
  headers: { 
    'Content-Type': 'application/json',
    'Authorization': 'JWT token'
  },
  data : data
};

axios(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

Response Example

status(200)
{
  "verified": true,
  "msg": "OTP is verified"
}

status(400)
{
  'ok': false,
  'msg': 'phone number, secret and OTP are required field'
}

status(401)
{
  "verified": false,
  "msg": "OTP is timeout"
}

status(401)
{
  "verified": false,
  "msg": "OTP is valid"
}