V
V
Vladimir2019-10-05 07:41:44
JavaScript
Vladimir, 2019-10-05 07:41:44

How to send sms via twilio api?

Good morning.
twilio is an SMS messaging service.
Everything is simple in the documentation , I inserted the code, installed it via npm, and launched it.
I did that, it doesn't work.
Here is my code:

const accountSid = 'я уберу id';
const authToken = 'я уберу token';
const client = require('twilio')(accountSid, authToken);

client.messages.create({
body: 'This is the ship that made the Kessel Run in fourteen parsecs?',
from: '+номер откуда',
to: '+номер куда'
}).then(message => console.log(message.sid));

console.log('twilio');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2019-10-05
@HistoryART

The operator was not

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question