发送你的第一条消息

安装节点模块

你可以通过在项目目录中运行以下命令来安装此模块:

npm install twilio

发送你的消息

const accountSID = ''; // Obtained from the Twilio Console
const authToken = '';   // Obtained from the Twilio Console

const client = require('twilio')(accountSID, authToken);

client.messages.create({
    to: '',  // Number you want to send to
    from: '', // From a valid Twilio number
    body: 'Hello, from Stack Overflow', // What appears in the text message
})
.then((message) => console.log(message.sid));