I am trying to write a little script to update cards with the amount of time the card has been on the list it is currently on, so we can optimize our throughput. I wrote a little script on jsfiddle that almost works, but I'm getting a "unauthorized card permission requested" when trying to use:
Trello.post("cards/" + card.id + "/actions/comments", {text: "This card has been in this list for " + ago + " days."})
or...
Trello.put("cards/" + card.id + "/name", "(" + ago + ") " + card.name);
Here is the fiddle, if that helps: http://jsfiddle.net/A3Xgk/2/
Any ideas? Thanks!
Try request your app token from https://trello.com/1/connect?key=yourkey&name=your_board_name&expiration=never&response_type=token&scope=read,write
reference: https://github.com/zmilojko/git-trello