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.
Plaid key types
| Type | Prefix | Secret? | Scope | Expiry |
|---|---|---|---|---|
| client_id Plaid describes it as a private identifier, so keep it out of public code even though it is not the secret. | — | No | Private identifier for your team, shared across environments | — |
| Secret Sent in the request body or the PLAID-SECRET header together with PLAID-CLIENT-ID. | — | Yes | One per environment (Sandbox, Production) | — |
| Access token Format is access-<environment>-<identifier>. Rotate a compromised one with /item/access_token/invalidate. | access- | Yes | One Item (a user's connection to a financial institution) in one environment | — |
How to create a Plaid key
- Sign in to the Plaid Dashboard with a user that has the Sandbox Keys or Production Keys permission.
- Open the Keys page.
- Copy the
client_idand the secret for the environment you are calling (Sandbox or Production). - Store them in a secrets vault and send them in the request body or as the
PLAID-CLIENT-IDandPLAID-SECRETheaders.
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
- Open the Keys section of the Plaid Dashboard.
- Click Rotate next to the secret for the environment you want to replace. Plaid generates a new secret.
- Copy the new secret, deploy it and test it.
- Click Delete on the old secret once nothing uses it.
The old secret stays active until you delete it, so both secrets work during the switch. A compromised access token is rotated separately with /item/access_token/invalidate.
How to revoke a Plaid key
- Rotate the secret in the Keys section of the Dashboard, then click Delete on the old secret. Requests using it stop working.
- For an exposed access token, call
/item/access_token/invalidateto replace it with a new one.
If your Plaid key leaked
- Rotate the exposed secret from the Keys section of the Dashboard.
- Deploy the new secret everywhere, then click Delete on the old secret so it stops working.
- If access tokens leaked as well, call
/item/access_token/invalidatefor each affected Item and store the new tokens. - Review which team members have the Production Keys permission and remove it from anyone who does not need it.
Environment variables and CLI
Plaid's SDKs and docs read the key from PLAID_CLIENT_ID, PLAID_SECRET, PLAID_ENV or PLAID_ACCESS_TOKEN.
Plaid CLI (plaid): plaid login opens a browser to sign in to the Dashboard and fetches your API keys; scripts can set PLAID_CLIENT_ID, PLAID_SECRET and PLAID_ENV instead
Things that catch people out
- Sandbox is
https://sandbox.plaid.comand Production ishttps://production.plaid.com; Items and access tokens cannot move between environments. - Application errors come back as
error_typeanderror_codein 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:dashboardscope that expires after 15 minutes.
Common Plaid authentication errors
invalid client_id or secret provided
INVALID_API_KEYS: the client ID and secret are not valid for the environment you are calling, often after switching environments without switching keys.
could not find matching access token
INVALID_ACCESS_TOKEN: the access token is invalid or belongs to a different environment.
you are not authorized to create items in this api environment.
UNAUTHORIZED_ENVIRONMENT: your client ID is not enabled for that environment, or the code calls a deprecated endpoint.
Using your Plaid key with AI agents
A coding agent that can read your .env file or your shell history can read the key, and anything in its context can end up in logs, transcripts or a prompt-injected request. The safer pattern is to keep the key in a credential broker that performs the authenticated step for the agent and hands back only the result.
BotPassword works this way. For a Plaid key, these intents fit:
| Intent | What BotPassword does |
|---|---|
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. |
Plaid also publishes its own MCP server. Whatever server the agent uses, keep the credential it authenticates with out of the agent's context.
Set it up in your agent: Aider · Amp · Claude Code · Claude Desktop · Cline · OpenAI Codex CLI · all agents
Frequently asked questions
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.