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

This widget could not be displayed.
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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Jun 20, 2018 in Trello

Get inspired with Trello & earn free Gold

A blank Trello board can be both a beautiful and intimidating thing. How many lists should I have? Is creating 10 labels overkill? How can I best track my progress? Is there a way...

17,097 views 0 17
Read article

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