Skip to content

Commit 7ef2410

Browse files
add granular scopes (#47)
1 parent 373a47e commit 7ef2410

File tree

2 files changed

+38
-7
lines changed

2 files changed

+38
-7
lines changed

openapi/openapi.yaml

+37-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: 3.1.0
22
info:
33
title: Figma API
4-
version: 0.28.0
4+
version: 0.29.0
55
description: |-
66
This is the OpenAPI specification for the [Figma REST API](https://www.figma.com/developers/api).
77
@@ -94,6 +94,7 @@ paths:
9494
security:
9595
- PersonalAccessToken: []
9696
- OAuth2:
97+
- file_content:read
9798
- files:read
9899
description: |-
99100
Returns the document identified by `file_key` as a JSON object. The file key can be parsed from any Figma file url: `https://www.figma.com/file/{file_key}/{title}`.
@@ -178,6 +179,7 @@ paths:
178179
security:
179180
- PersonalAccessToken: []
180181
- OAuth2:
182+
- file_content:read
181183
- files:read
182184
description: |-
183185
Returns the nodes referenced to by `ids` as a JSON object. The nodes are retrieved from the Figma file referenced to by `file_key`.
@@ -260,6 +262,7 @@ paths:
260262
security:
261263
- PersonalAccessToken: []
262264
- OAuth2:
265+
- file_content:read
263266
- files:read
264267
description: |
265268
Renders images from a file.
@@ -383,6 +386,7 @@ paths:
383386
security:
384387
- PersonalAccessToken: []
385388
- OAuth2:
389+
- file_content:read
386390
- files:read
387391
description: |-
388392
Returns download links for all images present in image fills in a document. Image fills are how Figma represents any user supplied images. When you drag an image into Figma, we create a rectangle with a single fill that represents the image, and the user is able to transform the rectangle (and properties on the fill) as they wish.
@@ -419,6 +423,7 @@ paths:
419423
security:
420424
- PersonalAccessToken: []
421425
- OAuth2:
426+
- projects:read
422427
- files:read
423428
description: "You can use this endpoint to get a list of all the Projects within
424429
the specified team. This will only return projects visible to the
@@ -454,6 +459,7 @@ paths:
454459
security:
455460
- PersonalAccessToken: []
456461
- OAuth2:
462+
- projects:read
457463
- files:read
458464
description: Get a list of all the Files within the specified project.
459465
operationId: getProjectFiles
@@ -490,6 +496,7 @@ paths:
490496
security:
491497
- PersonalAccessToken: []
492498
- OAuth2:
499+
- file_versions:read
493500
- files:read
494501
description: This endpoint fetches the version history of a file, allowing you
495502
to see the progression of a file over time. You can then use this
@@ -545,6 +552,7 @@ paths:
545552
security:
546553
- PersonalAccessToken: []
547554
- OAuth2:
555+
- file_comments:read
548556
- files:read
549557
description: Gets a list of comments left on the file.
550558
operationId: getComments
@@ -677,6 +685,7 @@ paths:
677685
security:
678686
- PersonalAccessToken: []
679687
- OAuth2:
688+
- file_comments:read
680689
- files:read
681690
description: Gets a paginated list of reactions left on the comment.
682691
operationId: getCommentReactions
@@ -812,6 +821,7 @@ paths:
812821
security:
813822
- PersonalAccessToken: []
814823
- OAuth2:
824+
- current_user:read
815825
- files:read
816826
description: Returns the user information for the currently authenticated user.
817827
operationId: getMe
@@ -832,6 +842,7 @@ paths:
832842
security:
833843
- PersonalAccessToken: []
834844
- OAuth2:
845+
- team_library_content:read
835846
- files:read
836847
description: Get a paginated list of published components within a team library.
837848
operationId: getTeamComponents
@@ -883,6 +894,7 @@ paths:
883894
security:
884895
- PersonalAccessToken: []
885896
- OAuth2:
897+
- library_content:read
886898
- files:read
887899
description: Get a list of published components within a file library.
888900
operationId: getFileComponents
@@ -915,6 +927,7 @@ paths:
915927
security:
916928
- PersonalAccessToken: []
917929
- OAuth2:
930+
- library_assets:read
918931
- files:read
919932
description: Get metadata on a component by key.
920933
operationId: getComponent
@@ -946,6 +959,7 @@ paths:
946959
security:
947960
- PersonalAccessToken: []
948961
- OAuth2:
962+
- team_library_content:read
949963
- files:read
950964
description: Get a paginated list of published component sets within a team library.
951965
operationId: getTeamComponentSets
@@ -997,6 +1011,7 @@ paths:
9971011
security:
9981012
- PersonalAccessToken: []
9991013
- OAuth2:
1014+
- library_content:read
10001015
- files:read
10011016
description: Get a list of published component sets within a file library.
10021017
operationId: getFileComponentSets
@@ -1029,6 +1044,7 @@ paths:
10291044
security:
10301045
- PersonalAccessToken: []
10311046
- OAuth2:
1047+
- library_assets:read
10321048
- files:read
10331049
description: Get metadata on a published component set by key.
10341050
operationId: getComponentSet
@@ -1060,6 +1076,7 @@ paths:
10601076
security:
10611077
- PersonalAccessToken: []
10621078
- OAuth2:
1079+
- team_library_content:read
10631080
- files:read
10641081
description: Get a paginated list of published styles within a team library.
10651082
operationId: getTeamStyles
@@ -1111,6 +1128,7 @@ paths:
11111128
security:
11121129
- PersonalAccessToken: []
11131130
- OAuth2:
1131+
- library_content:read
11141132
- files:read
11151133
description: Get a list of published styles within a file library.
11161134
operationId: getFileStyles
@@ -1143,6 +1161,7 @@ paths:
11431161
security:
11441162
- PersonalAccessToken: []
11451163
- OAuth2:
1164+
- library_assets:read
11461165
- files:read
11471166
description: Get metadata on a style by key.
11481167
operationId: getStyle
@@ -1410,6 +1429,7 @@ paths:
14101429
security:
14111430
- PersonalAccessToken: []
14121431
- OAuth2:
1432+
- webhooks:read
14131433
- files:read
14141434
description: Get a webhook by ID.
14151435
operationId: getWebhook
@@ -1531,6 +1551,7 @@ paths:
15311551
security:
15321552
- PersonalAccessToken: []
15331553
- OAuth2:
1554+
- webhooks:read
15341555
- files:read
15351556
description: Returns all webhooks registered under the specified team.
15361557
operationId: getTeamWebhooks
@@ -1560,6 +1581,7 @@ paths:
15601581
security:
15611582
- PersonalAccessToken: []
15621583
- OAuth2:
1584+
- webhooks:read
15631585
- files:read
15641586
description: Returns all webhook requests sent within the last week. Useful for
15651587
debugging.
@@ -2431,16 +2453,25 @@ components:
24312453
tokenUrl: https://api.figma.com/v1/oauth/token
24322454
refreshUrl: https://api.figma.com/v1/oauth/refresh
24332455
scopes:
2434-
files:read: Read files, projects, users, versions, comments, components &
2435-
styles, and webhooks.
2456+
current_user:read: Read your name, email, and profile image.
2457+
file_comments:read: Read the comments for files.
2458+
file_comments:write: Post and delete comments and comment reactions in files.
2459+
file_content:read: Read the contents of files, such as nodes and the editor type.
2460+
file_dev_resources:read: Read dev resources in files.
2461+
file_dev_resources:write: Write to dev resources in files.
24362462
file_variables:read: "Read variables in Figma file. Note: this is only available
24372463
to members in Enterprise organizations."
24382464
file_variables:write: "Write to variables in Figma file. Note: this is only
24392465
available to members in Enterprise organizations."
2440-
file_comments:write: Post and delete comments and comment reactions in files.
2441-
file_dev_resources:read: Read dev resources in files.
2442-
file_dev_resources:write: Write to dev resources in files.
2466+
file_versions:read: Read the version history for files you can access.
2467+
files:read: Deprecated. Read files, projects, users, versions, comments,
2468+
components & styles, and webhooks.
24432469
library_analytics:read: Read library analytics data.
2470+
library_assets:read: Read data of individual published components and styles.
2471+
library_content:read: Read published components and styles of files.
2472+
projects:read: List projects and files in projects.
2473+
team_library_content:read: Read published components and styles of teams.
2474+
webhooks:read: Read metadata of webhooks.
24442475
webhooks:write: Create and manage webhooks.
24452476
OrgOAuth2:
24462477
type: oauth2

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@figma/rest-api-spec",
3-
"version": "0.28.0",
3+
"version": "0.29.0",
44
"description": "Typings for the Figma REST API",
55
"main": "dist/api_types.ts",
66
"repository": {

0 commit comments

Comments
 (0)