const accountSid = 'account_sid';
const authToken = 'auth_token';
const client = require('twilio')(accountSid, authToken);
client.messages
.create({
to: '+94716220786',
from: '+13022519234',
body: 'Your verification code is ' + Math.floor(1000 + Math.random() *
9000)
})
.then(message => console.log(message.sid));
console.log('receive');
console.log(Math.floor(1000 + Math.random() * 9000));
我正在尝试使用 twilio 发送短信。我已经在我的 Angular 项目中安装了 twilio 最新版本。
But when the project runs, it says that "Cannot read property 'isTTY' of undefined"
我是一名优秀的程序员,十分优秀!