I want my plugin to retrieve remote data such as library styles and thumbnail previews from a user’s Figma file. So far, it seems like the only way to do so is through Figma’s REST api.
For starters, I’m trying to figure out how to prompt the user to give my plugin permission to access the contents of their Figma file. As someone with zero back-end knowledge, I’m completely stumped at Figma’s tutorial for authenticating users.
So the tutorial asks me to do this:
I have so many questions:
The documentation says that the URl must be opened in the user’s browser:
Does this mean that I need my plugin to open a new window for the permission prompt? If so, do I do so via something like window.open()?
The documentation says that I have to register my app in order to generate my client id like so:
Can this work even when my plugin isn’t published yet?
It seems like I have to setup a callback for the redirect URI for my app. What should I even put here?