Keys / Figma
FIGMA_ACCESS_TOKEN
The personal access token your app or script calls the Figma REST API with, sent in the X-Figma-Token header. It acts as you, limited to its scopes.
- Expires
- you choose, up to 90 days
- API
- none; account settings only
Get it
Create one on developers.figma.com/docs/rest-api/personal-access-tokens. The steps aren't recorded yet.
Set it
FIGMA_ACCESS_TOKEN=...
The Figma Code Connect CLI reads it when you don't pass --token. Other apps pass the token in. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- In Figma, open Settings > Security and click Generate new token. Give it the same scopes as the old one.
- Deploy it everywhere that reads
FIGMA_ACCESS_TOKEN. Both tokens work in the meantime. - Check that nothing still uses the old token, then revoke it. Revocation is instant.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.