I just started getting into PowerUp development (thanks Trello!) and am attempting to utilize the Rest API within a PowerUp. I’ve journeyed through the documentation and it definitely seems possible, looks like I just need to create an app.
Here comes the dumb question: is the powerup I’m creating considered an app or is that something else entirely? (Please forgive my ignorance…)
This is a great question. Here is how I think about it.
There are integrations that make use of Trello’s REST API. For instance, the Trello for Gmail add on allows users to create cards from their emails.
There are Power-Ups that make use of Trello’s Power-Up Platform. Power-Ups are always “enabled” on a board; generally this happens from the Power-Up directory: https://trello.com/power-ups/. Power-Ups only receive read access to the board on which they are enabled. They generally add functionality and some sort of UI/UX inside of the Trello client.
Some Power-Ups make use of the REST API, but not all.
If you want to add some sort of functionality inside of Trello (be it a card button, card back section, or another capability, you want to build a Power-Up. If you are wanting to interact with Trello via the REST API, but don’t need any of the capabilities, you don’t need to do anything with Power-Ups.
Trello API keys are meant to be publicly available. When a user grants your application access to their account (via the 1/authorize page), a token is generated specifically for that user. Tokens should be kept secret as they are used to access Trello as that user. So it is OK to have your API key (but no tokens!) publicly available in a GitHub Pages app.
Hey Bentley! Thanks for the response! It’s an honor to chat with half of the duo from the tutorial videos!
The above is all good information, as well as recommendations. Very much appreciated.
Are there any good examples of Power-Ups utilizing both the REST API and Capabilities on GitHub?
My initial thought right now is to have a board button that creates a card, labels it, maybe take some information from the user, and utilizes a capability (card-buttons, card-badges, etc.). This way the process is more automated and less manual.