This is a question related to obtaining access tokens for users within an Enterprise organization on the Figma.
Based on the documentation, it seems that the “file_variables:read” scope is required to read variables in Figma files, and this is specifically mentioned to be available for members in Enterprise organizations. https://www.figma.com/developers/api#authentication-scopes
We’ve noticed that the “file_read” scope is deprecated for OAuth 2 tokens when attempting to obtain an access token for an Enterprise user. It didn’t return any error nor access token.
Our team has been testing the API on personal accounts, and when we call Auth API for personal Figma accounts, it passed back the result(access token, expires in, refresh token) to my application.
Should we exclusively use the “file_variables:read” scope, or are there any additional considerations or scopes that need to be taken into enterprise accounts?
For your reference, this what my oauth calling API look like
id: "figma",
name: "Figma",
type: "oauth",
authorization: {
url: "https://www.figma.com/oauth",
params: {
scope: "file_read", // Should I add this scope as well for enterprise users? file_variables:read, file_variables:write
response_type: "code",
},
},