I able to create webhook but struggling to get post data of that url

Here is the registred webhook.

{
"id": "59fb6f025f9638a2b081201a",
"description": "Trello Webhook Server",
"idModel": "59edd17a48fa712db6465109",
"callbackURL": "https://gitbub-trello-webhook.firebaseapp.com/trelloUserWebhook",
"active": true
}

When i try to hit the callback url in the browser, I get empty output.

{}

I am really trying hard  from 2 weeks to get this working please some one help me on this.

Below is the way i am trying to get posted data:

//Code to get user activity on board.

app.get("/trelloUserWebhook", (req, res, next) => {

res.send(req.body);

});

1 answer

0 votes
Bentley Cook Atlassian Team Nov 07, 2017

The callback URL you provided when creating the webhook will be the URL that Trello sends a request to with updates whenever an action occurs related to the object representing by the idModel.

Assuming that 59edd17a48fa712db6465109 is the ID of a user that you want to receive updates about, you can change your server code to:

app.use("/trelloUserWebhook", (reqresnext=> {
  console.log(JSON.stringify(req.body, null, 2));
  res.sendStatus(200);
});

Now, whenever an action occurs for that user, Trello will POST a request to that URL and the request body will contain data about what action occurred.

You can also get all of the recent actions for the user by making a request to Trello's 1/members/{memberID}/actions API resource:

https://api.trello.com/members/59edd17a48fa712db6465109/actions?key={yourAPIkey}&token={yourAPItoken}

The difference between these two setups is that in the former, Trello is notifying you of updates and in the latter you are asking (also known as polling) Trello for the most recent information.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Jan 15, 2019 in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

253 views 4 1
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you