Example code in node.js for Bulk Whatsapp

Replace number, type, message, instance id and access token accordingly.

 

1. Below is the sample code for node.js:

const axios = require('axios');

const number = '9199XXXXXXXX';
const type = 'text';
const message = 'test message';
const instanceId = '6616XXXXX';
const accessToken = '661XXXXXX';

const apiUrl = `https://whatsapponcloud.com/api/send?number=${number}&type=${type}&message=${encodeURIComponent(message)}&instance_id=${instanceId}&access_token=${accessToken}`;

axios.get(apiUrl)
.then(response => {
console.log('API response:', response.data);
})
.catch(error => {
console.error('Error sending request:', error);
});

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Example code in python for Bulk Whatsapp

Replace number, type, message, instance id and access token accordingly.   1. Below is the...

Example code in php for Bulk Whatsapp

Replace number, type, message, instance id and access token accordingly.   1. Below is the...

Example code in ruby for Bulk Whatsapp

Replace number, type, message, instance id and access token accordingly.   1. Below is the...

Example code in java for Bulk Whatsapp

Replace number, type, message, instance id and access token accordingly.   1. Below is the...

Example code in asp.net for Bulk Whatsapp

Replace number, type, message, instance id and access token accordingly.   1. Below is the...