I am developing a Figma plugin which enable product manger to add document description and save in database, I am using figma.fileKey to distinguish files, but I checked with filekey can not be used for public plugin, so I want to know whether my plugin is public plugin? for the filekey it is only used for the user self.
figma.fileKey
can definitely be a little confusing when you’re first working with it. A couple of things to keep in mind:
-
What it actually is:
fileKey
is just the unique identifier for a specific Figma file. If you look at the URL of your file (e.g.,https://www.figma.com/file/xxxxxxx/...
), thatxxxxxxx
part is the file key. -
Public vs. private plugins: Whether your plugin is public or private doesn’t change how
figma.fileKey
works. What matters is that this value will only be available while your plugin is running inside a file. You can use it internally in your code to tell one file apart from another, but you can’t rely on it as a global “user-safe identifier” outside of Figma. -
Limitations: For published (public) plugins, you shouldn’t expect
fileKey
to act like a user-level ID. It’s strictly tied to the file context where the plugin is being run. If you want to save data per user, you’ll need to combinefigma.clientStorage
or your own backend authentication system with the file key. -
Practical approach: If your goal is to store descriptions in a database,
fileKey
works fine as a way to distinguish files. Just be aware it only makes sense relative to the current Figma file and won’t carry over to other user contexts unless you manage that externally.
your plugin can still be published publicly, but fileKey
is not a global user identifier — it’s file-specific. If you want to scope data to a user, you’ll need something additional on top.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.