#sandeep_webhook-signature-verification

1 messages ยท Page 1 of 1 (latest)

serene cosmosBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1264957245859565701

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

green tangleBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

tacit salmon
#

Hello

#

Are you using Node/Express here?

#

Or some other framework?

#

@stray relic let's chat here

stray relic
#

hello

#

actually i am using next js

#

supabase -

#

and vercel

tacit salmon
stray relic
tacit salmon
#

You'll need to disable bodyParser and make sure you consume the raw body, which is a buffer stream

stray relic
#

ok

#

then the webhook will trigger ?

tacit salmon
#

The webhook is currently triggering just fine. Your handler is sending back that 400 error

#

Since you aren't handling the signature verification correctly

stray relic
#

ok ok

#

checking

stray relic
#

i have tried it

#

but still have the issue

tacit salmon
#

Sorry ignore last comment, wrong thread.

#

Can you show me your webhook handler code?

serene cosmosBOT
#

๐Ÿง‘โ€๐Ÿ’ป How to format code on Discord

Inline code: wrap in single backticks (`)

This:

The variable `foo` contains the value `bar`.

Will turn into this:

The variable foo contains the value bar.

Code blocks: wrap in three backticks (```)

Also, you can specify the language after the first three backticks to get syntax highlighting.

This:

```javascript
function foo() {
return 'bar';
}
```

Will turn into this:

function foo() {
  return 'bar';
}```

Notes about **code blocks**:
- Specifying the language is optional (e.g., you can omit `javascript` in the example above)
  - If you don't specify the language you won't get syntax highlighting
- When you're inside a code block (after you type \`\`\`) the `Return`/`Enter` key will add a new line instead of sending your message
  - Once you end the code block `Return`/`Enter` works normally again

You can [read more about message formatting on Discord's website.](https://support.discord.com/hc/en-us/articles/210298617)
stray relic
tacit salmon
#

You aren't doing what they indicate in the SO though right?

#

They do const buf = await buffer(req);

#

You are still using getRawyBody()

serene cosmosBOT
stray relic
hollow ledge
#

Hi ๐Ÿ‘‹

I'm stepping in as my colleague needed to go.

What was the result of updating your code? Do you get the same error? What is the reason you are sharing this?

stray relic
#

your collegue told me to send the code ๐Ÿ™‚

hollow ledge
#

Right, then he told you that were not following the recommendations

#

So what did you do?

#

Have you tested your new code? Do you get the same error?

hollow ledge