const http = require('superagent')
// Enter API key
const token = 'token'
// Enter target phone number to send message
const phone = '+111111'
// Device to be used for message delivery
const device = '5ca6d9fdc46219001bxxxxxx' // device id
// Enter text message to send
const message =
Hello there!
This is a test message :)
// Send message via API
http
.post('https://api.wassenger.com/v1/messages')
.set('Token', token)
.send({
phone: phone,
message: message,
device: device
})
.then(res => {
console.log('Message sent successfully. See:', https://console.wassenger.com/messages/${res.body.id})
})
.catch(err => {
console.error('Cannot send message:', err.message, (status: ${err.status || err.code})
})
can anyone help me to make this script run on memento??