# Plaid API tokens: find, store, rotate, and use them safely with AI agents

Source: https://botpassword.com/keys/plaid
Last checked: 2026-11-08

Plaid API keys are a team-wide `client_id` plus one `secret` per environment (Sandbox and Production), found in the Keys section of the Plaid Dashboard. You rotate a Plaid secret with the **Rotate** button, and the old secret keeps working until you click **Delete**, so a Plaid secret can be replaced without downtime.

## Key types

| Type | Prefix | Secret | Scope | Expiry |
|---|---|---|---|---|
| client_id | — | No | Private identifier for your team, shared across environments | — |
| Secret | — | Yes | One per environment (Sandbox, Production) | — |
| Access token | `access-` | Yes | One Item (a user's connection to a financial institution) in one environment | — |

## How to create a Plaid key

1. Sign in to the Plaid Dashboard with a user that has the **Sandbox Keys** or **Production Keys** permission.
2. Open the [Keys](https://dashboard.plaid.com/developers/keys) page.
3. Copy the `client_id` and the secret for the environment you are calling (Sandbox or Production).
4. Store them in a secrets vault and send them in the request body or as the `PLAID-CLIENT-ID` and `PLAID-SECRET` headers.

## Limiting what the key can do

Plaid secrets are not scoped to products; each secret covers one environment. Limit who can see them with the Dashboard **Sandbox Keys** and **Production Keys** team permissions, and keep Sandbox and Production secrets in separate stores. Team Management members cannot view or change API keys.

## How to rotate a Plaid key

1. Open the Keys section of the Plaid Dashboard.
2. Click **Rotate** next to the secret for the environment you want to replace. Plaid generates a new secret.
3. Copy the new secret, deploy it and test it.
4. Click **Delete** on the old secret once nothing uses it.

## How to revoke a Plaid key

1. Rotate the secret in the Keys section of the Dashboard, then click **Delete** on the old secret. Requests using it stop working.
2. For an exposed access token, call `/item/access_token/invalidate` to replace it with a new one.

## If the key leaked

1. Rotate the exposed secret from the Keys section of the Dashboard.
2. Deploy the new secret everywhere, then click **Delete** on the old secret so it stops working.
3. If access tokens leaked as well, call `/item/access_token/invalidate` for each affected Item and store the new tokens.
4. Review which team members have the **Production Keys** permission and remove it from anyone who does not need it.

## Environment variables

- `PLAID_CLIENT_ID`
- `PLAID_SECRET`
- `PLAID_ENV`
- `PLAID_ACCESS_TOKEN`

## Gotchas

- Sandbox is `https://sandbox.plaid.com` and Production is `https://production.plaid.com`; Items and access tokens cannot move between environments.
- Application errors come back as `error_type` and `error_code` in the response body, so check those rather than only the HTTP status.
- The old secret keeps working after **Rotate** until you click **Delete**, so a leak is not contained until you delete it.
- The Dashboard MCP server uses a separate OAuth token with the `mcp:dashboard` scope that expires after 15 minutes.

## Using this key with AI agents (BotPassword)

- `run_with`: Runs a command with the key injected as an environment variable or a 0600 temporary file, never on the command line, and redacts the key from the output.
- `http_request`: Makes an authenticated API call after checking the destination against the hosts this key may be sent to. The response comes back with credential-shaped values redacted, and one that holds the key itself is refused.
- `rotate`: Partly built: creates a new key, stores it as pending, verifies it, promotes it, then revokes the old key after a grace period. Today it works for Cloudflare tokens and AWS IAM keys you have set up, and an agent can start it only under a grant with autopilot; other providers cannot be rotated through their API yet.
- `store_secret`: Saves a value the agent already holds as a new vault item.

## FAQ

### Where do I find my Plaid client_id and secret?

In the Keys section of the Plaid Dashboard at `dashboard.plaid.com/developers/keys`. You need the **Sandbox Keys** or **Production Keys** permission to see them.

### Are Plaid Sandbox and Production secrets different?

Yes. Plaid issues one secret per environment and a single `client_id` for your team.

### How do I rotate a Plaid secret?

Click **Rotate** in the Keys section of the Dashboard, deploy the new secret, then click **Delete** on the old one. The old secret works until you delete it.

### How do I rotate a leaked Plaid access token?

Call `/item/access_token/invalidate`. Plaid returns a new access token for the Item and the old one stops working.

### Why do I get INVALID_API_KEYS from Plaid?

The `client_id` and secret do not match the environment you are calling. Use the Sandbox secret with the Sandbox host and the Production secret with the Production host.

### Can an AI agent use my Plaid key without seeing it?

Yes, if the key never enters the agent's context. Instead of pasting the key into a chat or leaving it in a `.env` file the agent can read, keep it in a credential broker that injects it into the command or request on the agent's behalf. BotPassword does this with `run_with`, `http_request`, `store_secret`, so the agent gets the result and never the value.

## Sources

- https://plaid.com/docs/quickstart/
- https://plaid.com/docs/api/
- https://plaid.com/docs/account/security/
- https://plaid.com/docs/account/teams/
- https://plaid.com/docs/errors/invalid-input/
- https://plaid.com/docs/resources/cli/
- https://plaid.com/docs/resources/mcp/
