Skip to main content
Answered

How to get currentUser email using Miro object


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.

Best answer by Anthony Roux

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

View original
Was it helpful?
This topic has been closed for comments

3 replies

Kiron Bondale
Forum|alt.badge.img+7
  • Volunteer Community Moderator
  • 3040 replies
  • April 19, 2021

@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


Robert Johnson
Forum|alt.badge.img+13
  • Volunteer Community Moderator
  • 7246 replies
  • April 19, 2021

@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.


Anthony Roux
Mironeer
Forum|alt.badge.img+1
  • Mironeer
  • 215 replies
  • Answer
  • May 10, 2021

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