-
Notifications
You must be signed in to change notification settings - Fork 0
9. Node
Yohannes Mekonnen edited this page Sep 5, 2023
·
1 revision
const axios = require('axios');
let data = JSON.stringify({
"username": "your_username",
"password": "your_password",
"to": "9xxxxxxxxx",
"text": "your_message"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'your_single_url',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
const axios = require('axios');
let data = JSON.stringify({
"username": "your_username",
"password": "your_password",
"to": [
"9xxxxxxxxx",
"9xxxxxxxxx",
"9xxxxxxxxx"
],
"text": "your_message"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'your_list_url',
headers: {
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});