Hi, I'm trying to implement your service on my site. For the part relating to outgoing messages everything works perfectly, but I encounter some problems relating to incoming messages and therefore to the configuration of the webhook.
If I use external services for the simulation of HTTP calls (for example MockBin), I notice that the calls start perfectly from the service, but by configuring the session to point it to a webhook (I normally use Glitch, I don't know if it can be relevant) all my calls are bounced back and I receive the error code:
POST request was sent with status code: 403
Trivially, the code of my webhook is the following:
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
const PORT = process.env.PORT || 3000;
Hi, I'm trying to implement your service on my site. For the part relating to outgoing messages everything works perfectly, but I encounter some problems relating to incoming messages and therefore to the configuration of the webhook. If I use external services for the simulation of HTTP calls (for example MockBin), I notice that the calls start perfectly from the service, but by configuring the session to point it to a webhook (I normally use Glitch, I don't know if it can be relevant) all my calls are bounced back and I receive the error code: POST request was sent with status code: 403
Trivially, the code of my webhook is the following: const express = require('express'); const bodyParser = require('body-parser'); const app = express(); const PORT = process.env.PORT || 3000;
app.use(bodyParser.json());
app.use((req, res, next) => { res.header('Access-Control-Allow-Origin', '*'); res.header('Access-Control-Allow-Methods', 'GET,POST,PUT,DELETE'); res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization'); res.header('Access-Control-Allow-Private-Network', 'true'); next(); });
app.post('/webhook', (req, res) => { console.log('Received webhook request:'); console.log('Headers:', req.headers); console.log('Body:', req.body);
res.status(200).json({ message: 'Webhook received successfully!' }); });
app.listen(PORT, () => { console.log(
Server listening on port ${PORT}
); });{ "version": "2024.6.5", "engine": "WEBJS", "tier": "CORE", "browser": "/usr/bin/chromium" }
Is this an error that has already happened to you and are you able to help me resolve it and give me some advice?