Plugin API: currentuser permission set in manifest but still not able to get user info

manifest.json

{
 ...
  "api": "1.0.0",
  "main": "dist/code.js",
  "ui": "dist/ui.html",
  "editorType": [
    "figma"
  ],
  "permissions": [
    "currentuser"
  ],
  "networkAccess": {
    "allowedDomains": [...],
    "devAllowedDomains": [...]
  }
}

But error is thrown when calling figma.currentUser

"in get_currentUser: \"currentuser\" permission not specified in manifest.json. Add the following to your manifest.json: \"permissions\": [\"currentuser\"]. See https://www.figma.com/plugin-docs/manifest/#permissions for more details."

Figma typing version 1.78.0

I was unable to reproduce the bug. Make sure you are running the exact plugin that you added this permission to. You can also try removing the plugin from Figma and importing it from the manifest.

1 Like

Thanks for your quick reply.

After re-importing the manifest, it works as expected.
It is very weird in the sense that I only have this development plugin in my Figma.

Ensure you’re using the correct plugin with the added permission. If issues persist, remove the plugin from Figma and re-import it from the manifest.