Contribution of MSG91 towards MyShikshak

MyShikshak is a platform that works towards the advancement of our educational sector through (technologies, AI, ML, etc). All it needs is a quick two-step registration and the user is good to go. A user’s profile is created through which they can post or respond to a query, depending on whether they are a learner or a tutor. The registration process requires verification of the user’s contact number, and thanks to MSG91, the OTP is sent to user within a fraction of seconds.

We have been using MSG91’s OTP service to deliver our users the best experience.

We have set up the OTP service as described below, which is swift and easy.

The process has been described by our developer Kunal Yadav

We created a function that is solely responsible for sending OTPs. Since we are using Nodejs for the back-end I will demonstrate the Java-script code.

How it works

To send an OTP to a mobile you have to send a POST request to MSG91’s send OTP endpoint.

const http = require('http');

function sendOTP (phone, callback) => {
  let path = '/api/sendotp.php?otp_length=6&authkey=' + OTP_AUTH_KEY +
    '&message=&sender=MySHIK&mobile=+91'+ phone +'&otp_expiry=5';

  path = encodeURI(path);
  let options = {
    'method': 'POST',
    'hostname': '',
    'port': null,
    'path': path,
    'headers': {},

  let req = http.request(options, function(res) {
    let chunks = [];

    res.on('data', function(chunk) {

    res.on('end', function() {
      let body = Buffer.concat(chunks);
      try {
        callback(null, JSON.parse(body.toString()));
      } catch (err) {
        callback('Some error occurred');

Here I am using the http module to send a POST request. It’s a POST request but send the message details like the URL query string.

We can customize our OTP by the length, message, sender name, OTP expiration time.

That is what I am storing in the path variable. After storing, we also have to encode our URL.

Then we can send the request and handle the response via a callback.”

With the implementation of MSG91 for sending OTP, the registration process has become prompt as the user’s contact is instantly verified which is then used for logging in their account. We also use MSG91’s service to send text messages and updates regarding their query status, query response, profile updation and discounts to the user’s phone number.  MyShikshak is grateful to be sponsored by MSG91 and for using their text messaging service. We are proud to be among the list of prestigious companies that uses their service and their website can accessed here:


  1. Airx says:

    qmf Delta Airlines
    So if you’re a new mother and searching for a calm flight by means of one’s infant, there are assorted airlines including Emirates, Air France, that make the journey a happy person. Thus United Airlines can unquestionably be considered on the list of most useful airlines for your pets. Additionally, there are more smaller, start up airlines which are popping up round the space. Hence, if you’re a frequent traveler and also an American admirer, you then ought to be more mindful of a couple approaches to catch American Airlines inexpensive tickets. So, at least now, there exists a set of the most significant air companies to select at the event you decide to go to Europe. Be respectful, however, you should make sure you possess your dog with you. If organizing a visit to Europe, moreover picking out the very best destination, you also really ought to carefully opt for the absolute best airline to travel into Europe. Additionally, there are a lot of airlines to pick from. Northwest airlines boasts are the business pioneer for pet transportation in a secure and efficient method.

Leave a Reply

Your email address will not be published. Required fields are marked *