Skip to content
Discussion options

You must be logged in to vote

Usa Twilio para que puedas integrar whatsapp con node, un tiempo lo use y va de maravilla pero recuerda que cobra comiciones

`const express = require('express');
const bodyParser = require('body-parser');

const app = express();
const port = 3000;

app.use(bodyParser.urlencoded({ extended: false }));

app.post('/webhook', (req, res) => {
const message = req.body.Body;
const sender = req.body.From;

console.log(Mensaje recibido de ${sender}: ${message});

// Aquí puedes agregar la lógica para procesar el mensaje recibido

res.sendStatus(200);
});

app.listen(port, () => {
console.log(Servidor corriendo en http://localhost:${port});
});
`

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@connuna
Comment options

Answer selected by connuna
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Apps API and Webhooks Discussions related to GitHub's APIs or Webhooks Question Ask and answer questions about GitHub features and usage
3 participants