问题
Can anyone please tell me how to verify the phone number.
Once you've installed the app, some random code will be generated and sent as a text message to your phone. Then you enter that code the phone number will be verified.
How is this done?
回答1:
There are different services for things like this. They require a server and using some sort of service like Twilio and Nexmo.
回答2:
Should be a 3rd party service.
It works as below steps which is kind of straight forward:
- Mobile App sends a request to 3rd party service. That service trigger a SMS carrying a 'code' to user's phone (you have asked user to type in the phone no. prior), as well as return a 'token' to Mobile App.
- After user getting the SMS and type in the code, Mobile App send the 'code' and the 'token' to 3rd party service.
- 3rd party verify the 'code' and 'token' based on their database.
One service we ever used is: http://www.openmarket.com/messaging/sms-messaging/
来源:https://stackoverflow.com/questions/20890318/how-to-verify-the-phone-number-similar-to-whatsapp