Skip to main content
piusyikyu
New Participant
November 27, 2023
Question

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

  • November 27, 2023
  • 3 replies
  • 585 views

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

This topic has been closed for replies.

3 replies

tank666
November 27, 2023

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.

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
piusyikyu
piusyikyuAuthor
New Participant
November 27, 2023

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.

GlenMaxwel
December 21, 2023

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.