I. Main process of SMS access platform
- 1. Register the SMS service, apply for the ID, and key
- 2. Enter the configuration environment
- 3.npm install
- 4.npm start
- 5. Open the browser http://localhost:8083
Download the source code at 🐎
2. Configure the environment
- Ali Cloud server application SMS service, Node.js framework Express application
var client = new Core({
accessKeyId: "".// ID of SMS access
accessKeySecret: "".// Key for SMS platform access
endpoint: "https://dysmsapi.aliyuncs.com".apiVersion: "2017-05-25"
});
var params = {
RegionId: "".// Apply for the template yourself
PhoneNumbers: phoneNumber, // The phone number to send
SignName: "The wuling".// Create your own app name
TemplateCode: "".// Template code (create your own)
TemplateParam: '{"code":"' + code + '"}' // The verification code to send (the verification code can be generated randomly, see the program)
};
Copy the code
Test case 🧪
- 1. Start the project
- 2. Enter your mobile phone number and test it
- 3. Receive SMS messages
- 4. Verify the results
4. Main parameters 🔅
- RegionId
- PhoneNumbers
- SignName
- TemplateCode
- TemplateParam
- SmsUpExtendCode
- OutId
For details, please refer to 📖
- Nodejs SDK reference
Thank 🙇
- Speed up your front-end development 🚀
- ✍ handwriting vue with several processes
Like and support 👍
- blog
- Js knowledge collection
- CSS knowledge collection
- Vue knowledge collection
- Collection of algorithm problems