Reputation: 2079
I am designing a website.I want to validate the mobile no. entered by the user on the registration page, by sending a verification code to his mobile phone. Can anyone give me pointers to how should i proceed with it??
Upvotes: 4
Views: 8541
Reputation: 61
i Proudly recommend cognalys (note: I work for cognalys)
Because it provides an elegant API to verify international mobile numbers which can be integrated on any platform .
Step1 :
https://www.cognalys.com/api/v1/otp/?app_id=YOUR_OTP_APP_ID&access_token=YOUR_OTP_ACCESS_TOKEN&mobile=MOBILE
it will generate a missed call to the requested mobile number . And return a keymatch (to authenticate step 2 ) and otp_start ( the first five digits of the missed call number )
Step 2 :
https://www.cognalys.com/api/v1/otp/confirm/?app_id=YOUR_OTP_APP_ID&access_token=YOUR_OTP_ACCESS_TOKEN&keymatch=KEYMATCH&otp=OTP
Ask your user to enter the last five digit of the missed call number concatenate otp_start and last five digit for parameter otp and hit the API including keymatch
You are done ! . It uses a unique technique to verify mobile number
Upvotes: 5
Reputation: 87141
Uh, that really depends on what you're doing.
You can, for example, connect a phone to the server and send messages using a solution like gnokii or something like this. Or you can use one of email/www to SMS gates that are out there, on the internet.
On the other hand, you can reverse your usecase a bit. Instead of sending a confirmation code to the user (and, I guess, asking him to enter it back on your site) you can display a confirmation code to the user and ask to send a text message to the number you display.
This makes a user having to text you. First it lowers your expenses (if you pay for the message) and second, can prevent the evil users from trying to DOS your SMS system.
Upvotes: 4
Reputation: 250862
There are two options, depending on your budget.
Option 1 - buy an SMS gateway and install it on your server. You can then call an API from your server-side script that will send an SMS - you will need to supply the mobile phone number and the text content. This is the more expensive option unless you have a lot of volume.
Option 2 - use an SMS gateway service. In this case, someone else operates the gateway and you call their API to send messages. You normally buy "bundles" of texts to use this, so the cost depends on the number of texts you buy.
Upvotes: 4
Reputation: 7066
Probably the easiest solution is to use some webservice for sending SMSs.
For an example see this: http://www.codeproject.com/KB/cpp/SendSmsThroughWS.aspx
Upvotes: 0