Building a multi-tenant Trello app

I am building a web app that enables admins to integrate their Trello boards and view analytics. I was wondering if Trello offers a similar process to Jira, GitHub, and Slack for creating an app where admins can authenticate using the OAuth2 flow.

Could you guide me on how to set this up with Trello? Additionally, what is the best approach to fetch data from other boards?

Thank you!

Hello @SalahHaciakil

Welcome to the Developer’s forum

Trello does indeed have an OAuth flow for authenticating external connections to its REST API, however it is OAuth 1.0, not 2.0. You can read more about it on the Authorizing with Trello’s REST API documentation page.

Once you’ve got your app key, users can authorise your app and you can get an auth token, which your app can then use to make calls to the API endpoints. This includes all the Boards endpoints for interacting with Boards on a Trello instance.

Have fun

Hi @sunnyape, thank you for your response! I’m exploring a way to have the app function as an independent user (a bot user), rather than acting on behalf of the user who granted authorization. Is there an option to achieve this? I looking forward to avoiding scenarios like when the user goes out of the workspace and the token becomes invalid and I want to access all the boards on the workspace not only those the user has access to

Snce it will be you who created that bot user account anyhow and you who knows its password etc, there is nothing stopping you from personally acting in the role of the bot user and authorising the OAuth request flow yourself.

Alternatively, you can use Basic auth and securely store the bot user account’s key / token for your app to make requests to the REST API with, but then of course you lose the ability to act on behalf of specific users or to lookup their personal information the way OAuth provides.