It is more and more common to verify the authentication code by SMS, here is a brief introduction of how to complete the SMS verification code through the "cloud message" platform.
"Cloud News" platform is only responsible for sending text messages to the designated mobile phone number, the specific text message template needs to be set up in the "cloud" management platform, and the rest of the logic control needs to handle themselves, such as: How long the verification code expires, to ensure the uniqueness of the verification code and so on.
1): We need to register "http://www.ucpaas.com/" to the management platform of Cloud news, then get the corresponding developer information, the specific developer information will be used: AccountSid, Auth Token
2): After we create an application in the corresponding app list, we can then get the ID of the corresponding app.
3): In the testing phase, we can add several test phone numbers to the test whitelist for SMS sending, and after the application has been approved, we can send SMS in any previous mobile phone number.
4): In the SMS management, create the corresponding SMS template to the app you just added, then you can get the ID of the corresponding SMS template.
Then the development of code, by passing the corresponding parameters (developer information, application ID, SMS template information, receive SMS phone number, etc.) to invoke the Service in the platform to complete the text message delivery.
Specific code can go to the official designated location download "Http://docs.ucpaas.com/doku.php?id=%E5%BC%80%E5%8F%91%E5%AE%9E%E4%BE%8B", I have been tested locally, As for how to optimize the official case code and how to add logic according to their own needs, here is inconvenient to say ~ ~
How to send a text message via "cloud message" platform