This guide walks you through the steps to add an OAuth 2.0 client to your Trello app, choose an authorization flow, and migrate existing users from Trello Auth tokens to OAuth 2.0 tokens.
If you're new to Trello OAuth 2.0, start with the Getting Started with OAuth 2.0 page for an overview of how it works and an example Power-Up you can clone.
Trello's OAuth 2.0 3LO protocol (also known as "three-legged OAuth" or "authorization code grants") is the right choice for user-facing apps where a person logs in and consents to access. Your app can then access the Trello API on behalf of that user.
If that describes your app, then we recommend OAuth 2.0 as the most flexible and secure way for your app to access the Trello API. If your app does not run on behalf of a logged-in user (bots, automation, or server-to-server integrations), then OAuth 2.0 may not be the ideal authorization mechanism.
Navigate to your Trello app in the Trello apps administration page and click the OAuth 2.0 tab to create and configure your client. If you haven't created an app yet, then visit the OAuth 2.0 Getting Started page to get started with our example OAuth 2.0 Power-Up.
You'll need to configure a security type, callback URLs, and scopes. See OAuth 2.0 Client Configuration for full details on each of these settings.
Power-Up OAuth 2.0 clients are workspace-restricted. Certain scope permissions are limited to a single workspace, which means your Power-Up may need to request authorization from a user multiple times if they use it across different workspaces. OAuth 2.0 clients of non-Power-Up apps do not have this restriction.
How you implement authorization depends on whether your OAuth 2.0 client is public or confidential. See the security type documentation for help choosing between them.
Because your app already has users authorized with Trello Auth tokens, we strongly recommend pairing your new authorization flow with the token exchange flow. Token exchange takes a user's existing Trello Auth token and swaps it for a new set of OAuth 2.0 tokens, so your existing users can keep using your app without re-authorizing in the OAuth 2.0 consent screen.
Follow the detailed token exchange instructions for the type of OAuth 2.0 client you configured in Step 1:
POST /1/token/exchange endpoint for instructions on performing token exchange with a secure backend.A few important things to know before implementing it:
If your Power-Up stores personal data, you must comply with Trello's data privacy requirements. With an OAuth 2.0 client, you use your client credentials to authenticate with the compliance polling API instead of a Trello Auth API secret.
See Personal Data Storage and GDPR for the full compliance requirements, including how to poll with OAuth 2.0 credentials.
Be sure to checkout our other documentation to learn more about OAuth 2.0.
Rate this page: