# Trello API tokens (/integrations/trello-service-account)

Connect Trello with an API token created for the Sim deployment's API key. The token acts as the Trello member who authorized it and can access that member's boards.

Warning:

Trello tokens are bound to the API key that authorized them. A token generated with your own Trello Power-Up key will **not** work in Sim — Trello rejects it with `401 invalid token`. The token must be minted through Trello's authorize URL using the API key of the Sim deployment you're connecting to. Follow the steps below exactly.

## Prerequisites \[#prerequisites]

In Sim, you need workspace write access and permission to manage integrations.

You need a Trello account that has access to the boards your workflows will read and write. For production workflows, create a dedicated bot Trello account (e.g. `sim-bot@yourcompany.com`), invite it to the relevant boards, and mint the token while logged in as that account — the credential then survives any individual employee leaving.

## Generating the API token \[#generating-the-api-token]

Trello doesn't have a token-creation settings page. Tokens are minted by visiting an authorize URL in the browser while logged in to the Trello account that should own the token:

```
https://trello.com/1/authorize?expiration=never&scope=read,write&response_type=token&name=Sim&key=<SIM_TRELLO_API_KEY>
```

The `key` parameter must be the Trello API key of the Sim deployment:

- **Sim's hosted cloud** — contact [Sim support](mailto:help@sim.ai) for the authorize link with the deployment's key already filled in. Do not substitute your own key.
- **Self-hosted Sim** — substitute the value of your deployment's `TRELLO_API_KEY` environment variable. Trello API keys are public-by-design identifiers (not secrets); yours is shown at [trello.com/power-ups/admin](https://trello.com/power-ups/admin) under your Power-Up's API key page.

Log in to Trello as the account that should own the token (the bot account, for production)

Open the authorize URL above in the browser. Trello shows a consent page describing the access being granted

Click **Allow**. Trello displays the token on-screen — copy it

Warning:

Keep `expiration=never` and `scope=read,write` in the URL exactly as shown. A token minted with a shorter expiration (`1hour`, `1day`, `30days`) will validate today and silently die later. A read-only token (`scope=read`) also validates — but every Trello write tool in your workflows (create card, update card, add comment, and so on) will then fail at runtime.

Newer Trello tokens start with `ATTA`; older ones are 64-character hex strings. Both work — Sim doesn't enforce a format.

## Adding the API token to Sim \[#adding-the-api-token-to-sim]

Open **Integrations** from your workspace sidebar

Search for "Trello" and open it, then click **Add to Sim** and choose **Add API token**

Paste the API token, and optionally set a display name and description

Click **Add API token**. Sim verifies the token by calling Trello's `/1/members/me` endpoint — if it fails, you'll see a specific error explaining what went wrong.

The token is encrypted before being stored.

## Using the credential in workflows \[#using-the-credential-in-workflows]

Add a Trello block to your workflow. In the credential dropdown, select the saved Trello API token. Choose the operation and configure its inputs.
The block calls Trello's API (`api.trello.com`) with the token, paired server-side with the deployment's API key. The credential acts as the Trello member that minted the token, with access to exactly the boards that member can see.

## Verify access, rotate, or revoke \[#verify-access-rotate-or-revoke]

Run a read action against a board the issuing member can access, then test any required write. A read-only or short-lived token can pass connection validation and still fail later; use the scope and expiration in the authorize URL for the full action set documented here.

The member's current permissions determine board access. If a board becomes inaccessible, restore the member's access before retrying. If token creation is blocked for an Enterprise-managed account, ask the Trello Enterprise admin about its application restrictions.

To rotate, mint a replacement with the same deployment API key, update the saved credential in Sim, and verify the workflow. Then open `https://trello.com/u/my/account` as the token's owner and revoke the old **Sim** entry under **Applications**. Revoking a token prevents further API access. See [Trello's authorization reference](https://developer.atlassian.com/cloud/trello/guides/rest-api/authorization/).
