1. In order to achieve the registration function to verify the phone number we used the short message interface Netease cloud platform, find the relevant API Netease cloud messaging interface,
2. The application for the account of the company, create SMS templates and code in the form of need, to copy the relevant interface code to the following tools and configuration information needed to SMS, keys, and other information templates id
3. Write the test code from the front desk by filling out the phone number, click Send Verification Code button, ajax here by way of the value of the spread back and call the SMS interface is successful, this time the user will receive a text message on the phone.
4. Interface recall CAPTCHA fill the user verification code to judge whether the verification is successful and returns the value given
The user is prompted to give the corresponding reception by return accepted.
1. parameters:
Server_url: Netease given, fixed
App_key: Netease cloud letter assigned a public key registered to the account
App_secret: Netease cloud letter assigned key account registered to the
Nonce: random number, Netease parameters must be specified
2. sent from the client HTTP request to the server, SMS platform will generate a Hash value and getCheckSum () Hash value generated methods [that is, the server-side Hash Value] for comparison, the same that is to determine the identity: is my server to take to the phone number you want to get a verification code.
3. By ajax request, so that the background to get the phone number, call Netease interfaces (HTTP protocol), so that NetEase to send a verification code to this phone. Then again get the user's phone number and verification code to attribute message of my background to compare with NetEase, is the same as the validation is successful.