![]() We will fetch user’s mobile from the stored details and send SMS accordingly.īelow is the example of JSON we will store in our collection. Here, we have created a collection named as smsVerify(in the language of MySql I have a table). However, we don’t have any restriction to use mongoDB only you can use any Database of your choice. I am using MongoDB here and I assume the reader is pro-efficient in mongoDB. Creating NodeJs Sms Verification system 3.1 Getting started with mongoDB. Dedicated short codes are expensive and take 2-3 months to get approved, instead, you can now use local 10 digit VOIP numbers or also referred to as long codes to send a text/SMS programmatically from your Node.js app. You will be shown your API Key in a popup dialog. To send a text message using Node.js you don't need a dedicated short code. Once the payment was done, you can see the SMS credits credited to your account.Ħ.To obtain your API key, goto the API doc and click on KEY on the top right corner. You will be redirected to Payment option once you click proceed after filling the form.ĥ.Proceed with the payment. The cost would be around ₹715 ,including service tax etc.Ĥ.Now click next button you will be asked to fill a form where you have to provide your personal details. In that form select SMS Type as TRANSACTIONAL ROUTEand give no.of SMS as 2500 which is minimum credits to buy. We will first send an SMS with Node. Go to this Linkand Click on buy creditsafter that you will be asked to fill a form.ģ. In this article, you will learn how to send and receive SMS messages with Node.js and Express. Note: This SMS Gateway is for India.So select the gateway which is available in your country.ġ.So lets Sign-up to Msg91in order to get API KEY.Ģ.To send SMS, you have to buy some credits from Msg91. However for this article, am using Msg91as they have a flexible price range as well as very easy to integrate with the help of their node module. But Unfortunately, none of them are free to Test. I did my research to find right SMS Gateway to deliver messages and I found Msg91, Solutions Infini, SMS Gupshupand Twilioare quite popular. To send the SMS to a particular mobile number SMS gateways have a contract with all the mobile networks. SMS gateways can send an SMS to any mobile number that comes under any mobile network. ![]() To create NodeJs Sms Verification we have to buy one SMS Gateway. Than OTP will be entered by user for verification and after verification, we will activate user’s mobile number.SMS Gateway will deliver the SMS with OTP to user’s mobile number.Whenever a user tries to verify her/his mobile number we will initiate a request to SMS Gateway to send an SMS with randomly generated OTP.We will Store user’s information along with user’s mobile number.Before we start the development we need to understand how NodeJs Sms Verification system works. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |