How to Send Message on Whatsapp using Node JS
In this article, We will learn how to send message on whatsapp using php. RC PANEL WHATS API offers lots of features like Unlimited Message, Bulk Message, Access Chat, Access Group List, Unlimited Templates, Chat Bot etc. You can go to their official website https://whats-api.rcsoft.in/
Step 1: Create a Account on RC Panel, you need to create a account to send message.
Step 2: Connect Your Device to RC Panel
Step 3: Go to my app section and create app. Just Simple Put name and website link to proceed. Now you will get developer integration/API.
const express = require('express'); const bodyParser = require('body-parser'); const request = require('request'); const cors = require('cors'); const app = express() app.use(cors()); app.use(bodyParser.urlencoded({ extended: true })) const PORT = 5000 app.get('/', (req, res) => { const { to, msg } = req.body; var options = { 'method': 'POST', 'url': 'https://whats-api.rcsoft.in/api/create-message', 'headers': { }, formData: { 'appkey': 'xxxxxxxxxxxxxxxxxxxxxx', 'authkey': 'xxxxxxxxxxxxxxxxxxxxx', 'to': to, 'message': msg } }; request(options, function (error, response) { if (error) throw new Error(error); // console.log(); res.send(response.body) }); }) app.listen(PORT, () => { console.log('Listing at port ' + PORT) })