danships / kanboard-import-trello

An import script to move from Trello to Kanboard.
32 stars 13 forks source link

Documentation: How to get the Trello Token ? #4

Closed balessan closed 9 years ago

balessan commented 9 years ago

Hi there,

I tried to use your import script, and everything was going well after cloning and installing the dependencies, but launching the request just returned me a HTTP Code 401 : Unauthorized. I got it was due to a mismatch between the Trello Application Secret and Token.

So I was wondering how could I get the Trello Token associated with my user ? It is really not clear in their documentation, and your seems outdated (no references to "Click here to request a token to be used in the example" in the https://trello.com/app-key page)

If you have any answers, it would really help me,

PS: I cannot stand OAuth 1.0... Have been implementing a few authorizations process based on it in the last year and it is always painful ;-)

balessan commented 9 years ago

I solved my issue by myself.

You could probably add in your readme that the simpliest way to get the token is to go through the Trello API tutoriel located here : https://developers.trello.com/get-started

And create locally a simple index.html webpage containing only the call presented in the get-started + a global console.log of Trello.token().

Then go to this page in your browser, you will be prompted out with the authorization box, and when approved, the token will be logged in your console.

danships commented 8 years ago

The simplest way I found is to retrieve the api key is to use https://developers.trello.com/sandbox and https://trello.com/app-key (to get your own API key). If you authenticate using your accounts api key the authentication token is logged into the browser console by the Trello API client.