Capabilities
Client Library
Color Theme Compliance (Beta)
UI Functions

authorization-status

If your Power-Up requires that users authorize with some service before they can get the full functionality, you can help give them another way to authorize by telling Trello whether the user in question has already completed authorization.

Use authorization-status with show-authorization!

The authorization-status capability should almost always be used along with show-authorization capability. The function you provide for authorization-status will be used to determine whether the user is considered authorized or not. If not, the show-authorization capability determines what will be show to the user when they click Authorize Account.

If you return authorized: false, Trello will provide the following prompt when the user clicks the settings gear for your Power-Up. Clicking that takes us to show-authorization

Example Code

1
2
window.TrelloPowerUp.initialize({
  'authorization-status': function(t, options){
    // return a promise that resolves to the object with
    // a property 'authorized' being true/false
    // you can also return the object synchronously if you know
    // the answer synchronously
    return new TrelloPowerUp.Promise((resolve) => resolve({ authorized: true }));
  }
});

Rate this page: