Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a permanent user token for writes using the Trello API?

Tags:

trello

I'm trying to write an app that updates my Trello cards with the API. How do I get a permanent user token for the app to write to my Trello board?

Thanks

like image 283
Kar Avatar asked Jun 18 '13 21:06

Kar


People also ask

How do I get Trello API tokens?

You can get your API key by logging into Trello and visiting https://trello.com/app-key . Be sure to read and agree to Trello Developer Terms of Service. Your API key will be clearly labeled at the top of that page. Your API key should be a 32 character string comprised of random alphanumeric characters.

How do I create a Trello board token?

How to get started with Trello API: Login into your Trello Account. Go to this link to get the API Key. On the same page, click on generate token to generate a token which needs to be used to get authorization for your boards, lists & cards.

Does trello have an API?

Trello provides a simple RESTful web API where each type of resource (e.g. a card, a board, or a member) has a URI that you can interact with. The Trello API documentation is available at https://developer.atlassian.com/cloud/trello.

How do I authorize in trello?

The easiest and quickest way to pass authorization to Trello is via query parameters. You can include a key= and token= query parameter in your request.


1 Answers

You can do this in one of 2 ways -

Direct the user to the below address. This will direct the user to a page that has a token that she can copy and paste back to you. The important bit is that you ask for expiration = never and scope = read,write

https://trello.com/1/authorize?key=substitutewithyourapplicationkey&scope=read%2Cwrite&name=My+Application&expiration=never&response_type=token 

Or use OAuth (harder) to automate the request for an access token. Read more in the documentation.

Once you have the token, you can make any API call you'd like.

like image 184
Andy Jones Avatar answered Sep 30 '22 22:09

Andy Jones