Why is the figma.fileKey showing as undefined?

Hey,

We have recently launched a plugin namely, DesignBud. The problem we are currently facing is that, Thefigma.fileKey works in development but return undefined in production. We have also set “enablePrivatePluginApi” to true.

Any ideas on how to resolve the issue? Thanks in advance.

Is this a public plugin or the one published only to your Figma Organization? If it’s the former, you can’t use private plugin APIs. They are private because they are only available to private plugins that are not shared on Figma Community publicly. There is no way to get the file key for a public plugin other than ask the user to paste the link manually.

This was ridiculous !! They should have enable this