You dont have javascript enabled! Please enable it!

Importing Trello

Using the Trello API


Trello provides a simple RESTful web API, (documented here) where each type of resource (e.g. a card, a board, or a member) has a URI that you can interact with.

For example, if you’d like to use the API to get information about the Trello Development board, you’d use the following URI:


  • All API requests go to
  • The /1 part of the URI is the API version.
  • The /boards part means that we’re addressing Trello’s collection of boards
  • The /4d5ea62fd76aa1136000000c part is the id of the board that we want to interact with. You’ll notice that the board id is also part of the board’s URL in Trello


The simplest thing you can do with a Trello resource URI is GET it. (In a REST API, you “read” something by using the HTTP GET method). However, if you GET the aforementioned URI (, for example by pasting it in the address bar of a web browser, you won’t get the board data; instead you’ll get an invalid key error (with a 401 Unauthorized HTTP status code). That’s because all requests to the Trello API must include a application key, which Trello uses to identify the application making the request.

Getting Your Application Key

You can get your application key by logging into Trello, and then visiting

Your 32-character application key will be listed in the first box. For the rest of the examples, we’re going to assume that your application key is substitutewithyourapplicationkey

If you’re doing a GET request, you include your application in the query string portion of the URL. If you GET you’ll no longer get an error. Instead, you’ll get a response that looks like this:

{"id":"4d5ea62fd76aa1136000000c","name":"Trello Development","desc":"Trello board used by the Trello team to track work on Trello.  How meta!\n\nThe development of the Trello API is being tracked at\n\nThe development of Trello Mobile applications is being tracked at","closed":false,"idOrganization":"4e1452614e4b8698470000e0","url":"","prefs":{"voting":"public","permissionLevel":"public","invitations":"members","comments":"public"}}

All the responses to Trello API calls use JSON. You can make the response look prettied by running it through a javascript beautifier, which will give you something like this:

    "id": "4d5ea62fd76aa1136000000c",
    "name": "Trello Development",
    "desc": "Trello board used by the Trello team to track work on Trello.  How meta!\n\nThe development of the Trello API is being tracked at\n\nThe development of Trello Mobile applications is being tracked at",
    "closed": false,
    "idOrganization": "4e1452614e4b8698470000e0",
    "url": "",
    "prefs": {
        "voting": "public",
        "permissionLevel": "public",
        "invitations": "members",
        "comments": "public"

If you wanted to include additional information in the response, you could add additional parameters (documented here). For example, if you wanted to also get all the open lists and cards on the Trello Development board, you could GET this URL:

If you wanted to read a board of your own, you could get its id (the easiest way is to visit the board in Trello and copy the id out of the URL), and request

However, unless your board is public (like the Trello Development board), when you try to GET that URL, you’ll get a 401 unauthorized error. You can only read a private board (or card, or organization) if the API knows that you have permission to read that resource. You can tell the API that you’ve been authorized to read private data by including a token, which is given to your by a user and which allows you to read (and write) things on their behalf.

Getting a Token from a User

You can request a token from a user by directing them to URL like these:

Request a token granting read-only access for 30 days (the default):

Request a token granting read-only access forever:

Request a token granting read/write access for 1 day:,write

If the user accepts your request, they’ll be directed to a page where they will be given a token (64 characters), which they can give back to your application. If you add the token to your request, like so:

… then you’ll be able to read a board that’s only visible to the user

Once you’ve gotten a token from a user, you can also make requests that give you information about the user that authorized the token, like this:

Get the member's record:

Get the cards that a user is assigned to:

Get the open boards that a user is a member of:

Get the boards that a user has pinned to their boards menu:

Get the organizations that a user is a member of:

Of course, having a user copy and paste a token into your application isn’t very pretty. The Trello API also supports basic OAuth; you can use an OAuth library and the following URLs:


You’ll also need your application secret (used to sign your requests). That’s listed in the second box on

Using client.js

If you’re developing an application that has a web interface, you can use the Trello API client library, like so:

    <!-- ...  -->

    <!-- The client library requires jQuery  -->
    <script src=""></script>
    <script src=""></script>

    <!-- ...  -->

The un-minified, documented source of client.js is at

The client library can take care of getting the authorization token from the user

Examples using the client library:

Projects using/wrapping the Trello API


Client-Side tools


Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

error: Alert: Content selection is disabled!!