Could you help me with the Trello API, please?
For more than year i've been using the api with a webhook to notify .php file when a card is moved to another list, but recently i noticed that all the webhooks are not working any more. I haven't changed anything on my .php file and i was wondering if something on the API site has changed?
The .php file basically sends an email when a card is moved to a certain list. I use a webhook to notify the php file for the event.
I don't know how to check for errors and o see where is the problem. If you can help I'll be soo much thankful...
So the request are made from:
188.8.131.52 - - [17/Jan/2019:14:57:18 +0200] "POST /trello.php HTTP/1.1" 403 219 "-" "-"
184.108.40.206 - - [17/Jan/2019:14:57:47 +0200] "POST /trello.php HTTP/1.1" 403 219 "-" "-"
And it appeared that in .htaccess there was Deny rule for those IP addresses. Removed it and everything is back to normal.
@Tsvetan Tsakov if you look in your Trello settings, does that API token still have access to your account?
If so you should be able to fetch a list of all your webhooks valid for that token:
If the webhooks exist, what I would recommend is checking that the posts are making it to your server.
If they're not possible problems may be to do with either DNS or SSL, have you confirmed that the same URL you're using with Trello's webhooks are working in other situations for example in your web browser or as a webhook with another service such as Zapier?
Hi @Iain Dooley thank you for your advises!
In my Trello settings, the token looks okay:
and here https://developers.trello.com/reference/#tokenstokenwebhooks it lists correctly all the webhooks with status code 200. I tried zapier - it was okay.
However when i try to create a new webhook it returns 400 Bad Request:
URL (https://www.advokatami.bg/trello.php) did not return 200 status code, got 403
access-control-allow-headers: Authorization, Accept, Content-Type access-control-allow-methods: GET, PUT, POST, DELETE access-control-allow-origin: * cache-control: max-age=0, must-revalidate, no-cache, no-store connection: keep-alive content-length: 82 content-type: text/plain; charset=utf-8 date: Thu, 17 Jan 2019 09:41:22 GMT etag: W/"52-YG0G//vf2zebqZ4zFwgJOnQCGQs" expires: Thu, 01 Jan 1970 00:00:00 pragma: no-cache referrer-policy: strict-origin-when-cross-origin strict-transport-security: max-age=15552000 surrogate-control: no-store vary: Accept-Encoding x-content-type-options: nosniff x-dns-prefetch-control: off x-download-options: noopen x-frame-options: DENY x-trello-environment: Production x-trello-version: 1.1512.0 x-xss-protection: 1; mode=block
When i check the url here: https://httpstatus.io/ it is status 200.
The beginning of my php file is:
$data = json_decode(file_get_contents("php://input"), true);
$cardName = $data['action']['data']['card']['name'];
$contact = explode(",", $cardName);
$firma = $contact;
$receivedListID = $data['action']['data']['listAfter']['id'];
Hello Community! My name is Brittany Joiner and I am a Trello enthusiast and Atlassian Community Leader. I'll be sharing with you a series of videos with my top tips on how to best use Trello...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events