傳送你的第一條訊息

安裝節點模組

你可以通過在專案目錄中執行以下命令來安裝此模組:

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));