Skip to main content

Challenge with node Webhook

  • March 12, 2020
  • 3 replies
  • 4459 views

I am trying to connect my webhook up and have the challenge console logging on the lambda function, so I know it is not my gateway connection or my lambda function. What am I doing wrong in the return?! Below is the code. exports.handler = event => {
console.log( {“challenge”: JSON.parse(event.body).challenge});
return event.body;
};

This topic has been closed for replies.

3 replies

  • Author
  • New Participant
  • March 12, 2020

Finally got it to work. Below is my index.js file using node.js

exports.handler = async event => {
  console.log( {"challenge": JSON.parse(event.body).challenge});
  const response = {
    statusCode: 200,
    body: event.body
    
  };
  console.log(response);
  return response;
};

dipro
Forum|alt.badge.img
  • Leader
  • March 12, 2020

Amazing! Glad you got it working.


  • February 25, 2021

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.