The rest backend (the default) authenticates with a Figma personal access
token (PAT) supplied via the FIGMA_TOKEN environment variable — typically in
the consuming project's gitignored .env (see the main README).
-
In Figma, open the account menu → Help and account → Account settings.
-
Go to the Security tab → Personal access tokens → Generate new token. After generating, the token is listed here (and can be revoked).
-
In the dialog: give it a name (e.g.
Figma-Sync (read-only)), pick an expiration, and select only the scopes below (justfile_content:read). Copy the token value once — Figma shows it a single time — into your.envasFIGMA_TOKEN=….
figma-sync is read-only and calls exactly one endpoint —
GET /v1/files/:key/nodes — so it needs a single scope.
| Scope | Why |
|---|---|
file_content:read |
Read node/file content (and render images). The only scope the tool uses. |
| Scope | Enables |
|---|---|
file_metadata:read |
A cheap "did the file change at all?" pre-check via GET /v1/files/:key/meta before rendering each node. |
file_versions:read |
Version-history / named-version based change detection. |
webhooks:read + webhooks:write |
Push-based change notifications via Figma webhooks (write is needed to create the webhook). |
current_user:read, projects:read, file_comments:read,
file_comments:write, library_assets:read, library_content:read,
team_library_content:read, file_dev_resources:read,
file_dev_resources:write.
No *:write scope is ever required — the tool never writes to Figma. Grant
just file_content:read unless you opt into one of the features above.
- Tokens can expire (e.g. 90 days). When one expires,
figma:statusfalls back to thesnapshotbackend and prints a warning; generate a new token and update.env. - If a token leaks, revoke it from the same Security → Personal access tokens list ("Revoke access") and issue a new one.
- Never commit the token.
.envis gitignored;.env.exampledocuments the variable without a real value.


