Hello,
I'm trying to figure out how to use Trello API, so i started by following the help there : http://www.trello.org/help.html
So i generated the application key using the following link :
https://trello.com/1/appKey/generate
Then i tried through Postman to do a get on using my generated key https://api.trello.com/1/board/4d5ea62fd76aa1136000000c?key=substitutewithyourapplicationkey
It displayed "Invalid Key"
i got something wrong ?
That documentation seems terribly outdated. Please, check here instead: https://developers.trello.com
Perhaps it's outdated but it's a good step by step explanations, i already tried to follow the instructions on https://developers.trello.com/ but there's missing steps i guess.
I need to make a simple POC using Postman on how to get authorisation to acces to a board, and then to post a copy command to this board, it's as simple as that, then for developpment purpose we will take a look at the documentation
The guide you followed is outdated. Authentication now requires both an key and a token. Start by generating a key here. Then, follow the instructions on that page to generate the token.
Once you have both, you send them with your requests like this:
https://api.trello.com/1/board/4d5ea62fd76aa1136000000c?key=APPKEY&token=TOKEN
This is exactly what i've done but it says :
Taco says “invalid key”, but what does he know? He's just a dog.
Hi guys,
almost the same issue in my case too. The only difference is that, Trello gives me token of 32 hex digits. (not 64 digits)
On the Developer API Keys page I grab my API Key, then in the following URL I substitute it in place of KKK and hit the URL in a browser:
https://trello.com/1/authorize?expiration=1day&name=TrelloIntegrationSandbox&key=KKK&scope=read,write,account
Response from Trello:
You have granted access to your Trello information.To complete the process, please give this verification code:<hex string of 32 hex digits>
You have granted access to your Trello information.
To complete the process, please give this verification code:
<hex string of 32 hex digits>
Substituting my API Key and Token I hit the following link in a browser:
https://api.trello.com/1/members/me/boards?key=KKK&token=TTT
Oh no! 401!Taco says “invalid token”, but what does he know? He's just a dog.
Oh no! 401!
Taco says “invalid token”, but what does he know? He's just a dog.
See my experiment in JSFiddle.
How are you submitting the request? Are you sure the parameters are encoded and passed correctly?
@Oscar Triscon, at this stage the only 3 parameters are the 'me' literal, the API Key and the Token. The hex digits of the API Key and Token have no special meaning in URLs. What and why sould we encode?
Unfortunately not only my code doesn't work, but the live help fails too.
I fill my API Key, Token and the id parameters in, click the Try it and get practically the same error message from Trello:
401 UnauthorizedYou couldn't be authenticated
401 Unauthorized
You couldn't be authenticated
Does anyone have any idea what do I wrong?
The token is 64 hex chars, so there's something wrong there.
Have you tried using the Token link in the page you used to get the app key (https://trello.com/app-key)?
Trello Support helped me to solve the problem.
There is an additional parameter, that is not documented on the aforementioned Trello API documentation pages.
One need to include the response_type=token parameter in the authorization URL in order to get the correct token.
hi Zoltan,
im facing a similar issue, can you post the final url here, is it like this?
https://api.trello.com/1/members/me/boards?key=KKK&token=TTT&response_type=token
Hi Abhishek,
in case of board, card,... requests you don't need the response_type=token parameter.
However, you need it in the URL by means you ask for your authorization token.
My Trello sandbox on JSFiddle is up to date and works fine. Try it.
Copy-paste your API key into the appropriate text field then observe the "Authorize your API Key" link.
There is a secret for OAuth listed on the page along your API key. If you were like me, you took secret and put to the request as a token. But that is wrong :-) Took me a while to figure you.
To get valid token for a request, it needs to be generated via API call below.
https://trello.com/1/authorize?expiration=never&scope=read,write,account&response_type=token&name=Server%20Token&key=YOURAPIKEY
I had this same problem and could not figure out what the issue was. Eventually I tried pasting the URL with my API key and API token into a Chrome address bar and it returned the expected JSON. I then wrote a quick Ruby script using the same API key and token and it also worked as expected.
That leaves me to believe there's something about the way curl handles authentication that is missing from the documentation on the developer site. That's really unfortunate because anyone trying to get their authentication working would reasonably assume they were doing something wrong if they follow the directions to the letter and don't get the expected results.
After playing around with this, I've found that when using `curl` you need to put the URL in quotations. Otherwise, `curl` doesn't interpret it as a continuation of the URL and bash picks it up and backgrounds the command.
I'm going through the documentation now to make sure that curl examples include quotations around the URLs.
For reference, this:
curl https://api.trello.com/1/members/me?key={apiKey}&token={apiToken}
should be:
curl `https://api.trello.com/1/members/me?key={apiKey}&token={apiToken}`
can someone answer me how can I solve the invalid key?
Hello Trello team,How can i used our team previous api key to recreate token? that api key is not created by me, i used my personal key to create token, and it return my token is not joined enterprise, so how can i join specific enterprise?Trello API error: : Cannot request to join enterprise using non-privileged tokens
It looks like you're new here. Sign in or register to get started.