Skip to main content

I want to get current user email address on Miro board load using Miro object. Please help me which object we have to use to get current user email.

@janardhan -

Are you referring to a development method via Miro’s API or a native command? If you mean natively I don’t believe there’s any way to see user e-mail addresses in a board, but assuming you have access to the team’s Active Users view (by clicking on the team “gear” icon in the Dashboard) you could see their e-mail addresses under their user names in the list of users.

Kiron


@janardhan - It does seem like you are referring to using the Miro Developer Platform, therefore I am moving this post to the Developer Platform and APIs category.

As @Kiron Bondale mentioned, the currentUser email will not be stored in the board, otherwise anyone could see this using a browser’s developer tools. It is my limited understanding that you would use the SDK to get the object creator’s ID and then I assume you could use the REST API to get more user details - more info on this can be found in the developer platform documentation.


Hi @janardhan,

 

You can use the Get Current User REST API.

 

A cURL example would be (don’t forget to replace {access_token} by your access_token)

Query:

curl --request GET \
--url https://api.miro.com/v1/users/me \
--header 'Authorization: Bearer {access_token}'

Response:

{
"type" : "user",
"id" : "xxx",
"name" : "Anthony Roux",
"createdAt" : "2021-04-01T09:35:41Z",
"company" : "Miro",
"role" : "developer",
"industry" : null,
"email" : "xx@miro.com",
"state" : "registered",
"picture" : {
"type" : "picture",
"imageUrl" : "xxx",
"id" : "xxx"
}
}

 

Regards,

Anthony