Skip to main content
Solved

Read current page comments

  • February 12, 2023
  • 8 replies
  • 1654 views

GopalGupta

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

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

View original
This topic has been closed for replies.

8 replies

tank666
  • 4873 replies
  • Answer
  • 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


GopalGupta
  • Author
  • 3 replies
  • 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
  • 4873 replies
  • February 13, 2023

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


GopalGupta
  • Author
  • 3 replies
  • 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
  • 4873 replies
  • 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

GopalGupta
  • Author
  • 3 replies
  • February 13, 2023

Thanks @tank666 for your great help!!


Vincent_Perrier_UNITEP

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
  • 4873 replies
  • September 27, 2023

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings