Getting an empty webhook request

I’m trying to get events using webhooks, I’m using Ngrok to redirect requests to my NestJS backend.

On the Ngrok side, I’m getting the request body without any issue as you can see in the attached screenshot, but on my webhook endpoint I’m getting an empty body


What I’m doing wrong here

@Hexacker,

I don’t think anything about that approach is supposed to work. Have you tried Forge product events instead?

If you have your own backend, hosted on your server (in this case locally with ngrok, but you get my point), wouldn’t you use Connect instead of Forge?
Forge is meant to be hosted by Atlassian using their SDK, which definitely doesn’t look anything like NestJS :smile:
With Connect, as long as you manage the app installation events and authentication, you should be easily able to use Nest or any framework you like

That’s exactly what I’m using, I have built a Forge app that connects to my backend and sends Forge Product Events.

I’m using the “@forge/api” lib

I used Forge because I understood from the doc that it’s the best choice, I haven’t used any features except listening to events and sending these events to my backend to treat it, no more than that.

Can I confirm that the webhook sends a POST to ngrok with a full body, but ngrok then empties the body to just {} ?

That’s what I thought, I used Ngrok alternatives like Zrok and TunnelIn and I got the same result.
On the other hand, I tested Stripe webhook with the same tools and it works just fine.

I have fixed it, it’s really simple to fix I just didn’t notice it.
I forgot to add the Content-Type header in the request so my NestJS app was not accepting it as a body request.

3 Likes