Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

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

keilorblend360
Level 2
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?

 

1 Accepted Solution
keilorblend360
Correct answer by
Level 2
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
keilorblend360
Correct answer by
Level 2
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