How to get Figma user email?

I’m creating a Figma plugin in which I want to recommend the email by which the user is currently logged in with on Figma for further usage of the plugin.

I’ve tried using figma.currentUser but what it gives back is an object with the user’s id, name, color, photoUrl and sessionId. How can I get the email by which the user is logged in with?

This cannot currently be achieved with the Plugin API.

Is there any other possible way?
Source: (Figma)

This source says something about a “User” object that has the email. I couldn’t fully understand this tough, any explanation would be much appreciated! :slight_smile:

As you may have noticed, this is the REST API documentation. To get a user’s email via the REST API, the user must create and share their Personal access token with you.