Skip to main content
GopalGupta
February 12, 2023
Solved

Read current page comments

  • February 12, 2023
  • 8 replies
  • 2040 views

Hi Folks,

I have requirement to read the all comments on current figma page and download them as csv file as soon I run my figma plugin. I tried to look at API’s but I haven’t found anything so far about comments API, could you please help me with this?

Thanks

This topic has been closed for replies.
Best answer by tank666

This is not possible with the Plugin API, but you can use the REST API and the “GET comments” endpoint.
https://www.figma.com/developers/api#comments

8 replies

tank666
tank666Solution
February 12, 2023

This is not possible with the Plugin API, but you can use the REST API and the “GET comments” endpoint.
https://www.figma.com/developers/api#comments

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
GopalGupta
February 13, 2023

Thanks @tank666 for reply, can I get X-FIGMA-TOKEN value in the figma plugin so I can call the api from plugin to download it.

tank666
February 13, 2023

You can only get a user’s personal access token when they enter it into your plugin’s input field.

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
GopalGupta
February 13, 2023

No way to get automatically in the plugin? (I don’t want that they copy and paste it manually, because they have to copy it and keep it in local and everytime they need to paste it so it’s difficult to do)

tank666
February 13, 2023

This is impossible. This should only be done by the user.

Everything related to the personal access token is described in the links below.
https://www.figma.com/developers/api#access-tokens

Figma Help Center
UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
GopalGupta
February 13, 2023

Thanks @tank666 for your great help!!

Vincent_Perrier_UNITEP
New Member
September 27, 2023

Hi,

Do you know a way to access the comments on a file branch. Does API only work on the main file ? That’s a bummer.

Thanks.

tank666
September 27, 2023

Have you tried specifying the branch key instead of the main file key?

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank