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

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

Figma personal access tokens are created under **Settings** → **Security** → **Personal access tokens** in Figma, with chosen scopes and an expiry of at most 90 days, and are sent in the `X-Figma-Token` header to the Figma REST API. Organization and Enterprise admins can instead create plan access tokens, which are not tied to a person and last up to a year. Figma's official MCP server at `https://mcp.figma.com/mcp` signs in with your Figma account in the browser, so it does not need a personal access token.

## Key types

| Type | Prefix | Secret | Scope | Expiry |
|---|---|---|---|---|
| Personal access token | — | Yes | The scopes chosen at creation, never more than your own access to files, teams and projects | Chosen at creation, at most 90 days; non-expiring tokens can no longer be created (since April 28, 2025) |
| Plan access token | — | Yes | API access to an Organization or Enterprise plan, not tied to an individual user | Up to 365 days; can be refreshed while active |
| OAuth access token | — | Yes | The scopes the user granted to your OAuth app | — |

## How to create a Figma key

1. In the Figma file browser, open the account menu in the top-left corner and choose **Settings**.
2. Open the **Security** tab and find **Personal access tokens**.
3. Click **Generate new token**, enter a name, and set the expiration and scopes.
4. Press Return to create the token, then copy it at once; Figma shows it only once.

## Limiting what the key can do

Pick the narrowest Figma scopes: `file_content:read` to read file contents, `file_comments:read` or `file_comments:write` for comments, `file_variables:read` for variables, `file_dev_resources:read` for Dev Mode resources and `webhooks:write` for webhooks. The broad `files:read` scope is deprecated, and `projects:read` and `project_metadata:read` are deprecated too. Scopes never exceed what the organization or the owner of a file, folder or team allows you to do. The **Security** tab shows each token's scopes and when it was last used, which helps spot a token that is being misused.

## How to rotate a Figma key

1. Generate a new personal access token with the same scopes and an expiry of up to 90 days.
2. Update the integration or environment variable (for Code Connect CI, `FIGMA_ACCESS_TOKEN`) to the new token.
3. Revoke the old token in **Settings** → **Security**.
4. For plan access tokens, use refresh instead; the previous secret keeps working for 24 hours.

## How to revoke a Figma key

1. Open the account menu, choose **Settings** and open the **Security** tab.
2. Under **Personal access tokens**, select the token and click **Revoke access**; Figma says revocation is instant.
3. Admins revoke plan access tokens from the developer hub; that is immediate and cannot be undone.

## If the key leaked

1. Revoke the token in **Settings** → **Security** immediately.
2. Check the token's last-used time and the files it could reach for activity you did not start.
3. Generate a replacement with fewer scopes and a short expiry, and update the integration.

## Environment variables

- `FIGMA_ACCESS_TOKEN`

## Gotchas

- Personal access tokens expire after at most 90 days, so integrations built on one break on a schedule unless the token is rotated.
- A token is shown only once; leaving the page before copying it means generating another.
- The `files:read` scope is deprecated; new tokens should use granular scopes such as `file_content:read`.
- Government accounts use a separate MCP endpoint, `https://mcp.figma-gov.com/mcp`.

## 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.

## FAQ

### Where do I find my Figma API key?

Figma calls it a personal access token. Create one in **Settings** → **Security** → **Personal access tokens** → **Generate new token** and copy it when shown.

### Do I need a Figma API key for the Figma MCP server?

No. Add `https://mcp.figma.com/mcp` to your MCP client (for Claude Code, `claude mcp add --transport http figma https://mcp.figma.com/mcp`), choose **Authenticate**, and click **Allow access** in the browser. The sign-in replaces a personal access token.

### How long does a Figma personal access token last?

You set the expiry when you create it, up to 90 days. Figma stopped allowing non-expiring tokens in April 2025.

### Which header does the Figma API use for tokens?

Send a personal or plan access token in the `X-Figma-Token` header on every REST API request.

### What token should Figma Code Connect use in CI?

Code Connect reads `FIGMA_ACCESS_TOKEN`. Figma suggests a plan access token for CI because it lasts up to a year, against the 90-day maximum of a personal token.

### Can an AI agent use my Figma 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`, so the agent gets the result and never the value.

## Sources

- https://help.figma.com/hc/en-us/articles/8085703771159-Manage-personal-access-tokens
- https://developers.figma.com/docs/rest-api/personal-access-tokens/
- https://developers.figma.com/docs/rest-api/plan-access-tokens/
- https://developers.figma.com/docs/rest-api/scopes/
- https://developers.figma.com/docs/rest-api/authentication/
- https://developers.figma.com/docs/rest-api/errors/
- https://developers.figma.com/docs/rest-api/changelog/
- https://developers.figma.com/docs/code-connect/ci-cd/
- https://help.figma.com/hc/en-us/articles/32132100833559-Guide-to-the-Figma-MCP-server
- https://help.figma.com/hc/en-us/articles/39888612464151-Claude-Code-and-Figma-Set-up-the-MCP-server
