Expand my Community achievements bar.

SOLVED

No Request Body (Payload) in Privacy Event from Adobe IO Events

Avatar

Level 2

*SOLVED. ANSWER BELOW*

I am following the documentation for Subscribing to Privacy Events (found here). 

Things I have done:
1. I have created my local Node.JS/Express App and linked it to ngrok for a public URL.
2. I have linked my webhook ngrok url to a Privacy Events integration and verified the challenge. 
3. I have set up a "post" route on the root "/" and am logging the request, however there is no body: 

 

 

app.post('/', function(request, response) {
  console.log(request);
  console.log(request.body);
  response.send( request.body);
})

 

 


If I go to the "debug tracing" of the events in the integration I set up, it's showing a "payload" with information about the event, including the JobID and what product/action was completed. This "payload" is not visible on the request.

 

Here is a pastebin of the entire request object logged from console.log(request); There is no body. 


Where am I supposed to get the data from the payload?

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 2

Figured it out. Use the express.json() method to parse your body. Not mentioned in the setup docs.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 2

Figured it out. Use the express.json() method to parse your body. Not mentioned in the setup docs.