#Sera

1 messages · Page 1 of 1 (latest)

fiery crescentBOT
fossil ravine
#

Hello

mellow gorge
#

Hello

fossil ravine
#

Can you show me your Express initialization?

#

Most likely the Express framework is manipulating the raw body

#

Which is causing the verification to fail

#

Like are you using express.json() at all?

#

Or bodyParser?

mellow gorge
#

Wait I will shoıw you

#
const express = require("express");
const bodyParser = require("body-parser");
const app = express();
app.use(cors());
app.use(express.static("public"));

app.use(express.json());
app.listen(port, () => {
  console.log("Connected! to " + port);
});

frail sphinx
#

👋 hopping in here since bismark had to head out - give me a minute to catch up

frail sphinx
#

This is a common issue a lot of folks using Express have hit before - that thread has a ton of suggestions and solutions for how to get around it

mellow gorge
#

I will let you know if something works

frail sphinx
#

Yeah definitely try those solutions - my suspicion is that requesting the raw body with router.post() is too late in the stack. You likely need to do declare it earlier (with app.use)