Answered

How to retrieve user name from webplugin?

  • 31 May 2021
  • 2 replies
  • 137 views

Userlevel 2

Is there any way to retrieve current user name with web plugin API, I see that there is an interface IUserInfo for user data, but not seeing how it can be fetched with API.

icon

Best answer by Anthony Roux 2 June 2021, 09:54

View original

2 replies

Userlevel 5
Badge +1

Hi @Ramkumar,

 

Please note that what is described below is an undocumented feature and might be updated/removed in the future:

 

You can find information about the current user by calling the method:

await miro.board.getInfo()

In the response > currentUserContext > user > name

 

Badge +1

This post is not relevant anymore. As @Anthony Roux described, it was an undocumented feature. Currently when i am retrieving the response it only has the following parameters: 

 

createdAt

id

updatedAt

 

and is only really outputting values about the board and nothing else. Nevertheless for Apps using the Web SDK that are dependent to identify the user it would be great to have the feature to retrieve the user id. If there is a command that i am missing that would output this and is documented for the Web SDK I would be more than happy for help!

Reply