Hey guys,
I am deploying my parse server to heroku, however I can’t seem to understand how to listen for webhook requests. As per this thread: Using event-syncs in Moralis SDK v2 & Parse Server we are supposed to create a post route for each of our webhooks.
What exactly do we have to put inside the /webhooks/test file and how exactly do we process the information to store it in the database (if that’s what’s we have to do). Also, is it necessary to use the verify signature function?
Thanks!
UPDATE: So I found the Github repo for streams-beta(https://github.com/MoralisWeb3/streams-beta) where there’s a bit more info on processing webhooks.
It says I can use the Moralis.Streams.verifySignature
function to verify the webhook. It also says I can use the following to parse event data:
const decodedLogs = Moralis.Streams.parsedLogs<MyEvent>({ webhook, tag });
decodedLogs[0]
However, where exactly in my parse server should I include this code?