Using Trello’s API with API::Trello

1 minute read

I’ve been keeping my work todo lists in Trello and now need to share with other teammates that don’t use Trello. Rather than forcing them to change, I want to export the board I use to some sort of flat file so that they can reference it.

I want to include all the comments I’ve made, and keep the structure. None of the existing tools I was able to find fit these requirements. Time to write my own, luckily Trello has a great api.

Digging into the toolbox, this is a perfect job for Perl, and the API::Trello module. Unfortunately I ran into a few problems.

Following the module documentation to first try and connect to the Trello API, I kept getting invalid token error. After some trial and error I found this post which explains that prior to issuing requests with API::Trello you must connect to:

https://trello.com/1/connect?key=[application_key]&name=MyApp&response_type=token

And authorizing my appliction, which will return a token to be used in applications. The application_key can be retrieved by visiting https://trello.com/app-key from a signed in browser.

Once you have the token, setting up the API calls with API::Trello is easy.

use API::Trello;

my $trello = API::Trello->new(
  key        => '<application_key>',
  token      => '<token returned by first call>',
  identifier => 'MyApp',
);

Categories:

Updated: