# How to get user info? tried \`/rc/api/v1/users.info?userid="user-id-here"\`

**URL:** <https://forums.rocket.chat/t/how-to-get-user-info-tried-rc-api-v1-users-info-userid-user-id-here/13070>\
**Category:** Development\
**Tags:** rocketchat-apps\
**Created:** [January 20, 2022, 12:25pm UTC](https://forums.rocket.chat/t/how-to-get-user-info-tried-rc-api-v1-users-info-userid-user-id-here/13070 "2022-01-20T12:25:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nishlashakya](https://avatars.discourse-cdn.com/v4/letter/n/bc79bd/32.png) [@nishlashakya](https://forums.rocket.chat/u/nishlashakya)\
**Post date:** [January 20, 2022, 12:25pm UTC](https://forums.rocket.chat/t/how-to-get-user-info-tried-rc-api-v1-users-info-userid-user-id-here/13070/1 "2022-01-20T12:25:36Z")

</div>

the above api return dummy response

```auto
{
    "user": {
        "_id": "rocket.cat",
        "createdAt": "2021-09-09T02:13:14.638Z",
        "name": "Rocket.Cat",
        "username": "rocket.cat",
        "status": "online",
        "utcOffset": 0,
        "active": true,
        "type": "bot",
        "roles": [
            "bot"
        ],
        "avatarETag": null,
        "canViewAllInfo": true
    },
    "success": true
}

```

for any user

---

<div class="post-metadata">

**Author:** ![nishlashakya](https://avatars.discourse-cdn.com/v4/letter/n/bc79bd/32.png) [@nishlashakya](https://forums.rocket.chat/u/nishlashakya)\
**Post date:** [January 20, 2022, 12:26pm UTC](https://forums.rocket.chat/t/how-to-get-user-info-tried-rc-api-v1-users-info-userid-user-id-here/13070/2 "2022-01-20T12:26:12Z")

</div>

@dudanogueira can you please help

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [January 24, 2022, 1:40pm UTC](https://forums.rocket.chat/t/how-to-get-user-info-tried-rc-api-v1-users-info-userid-user-id-here/13070/3 "2022-01-24T13:40:35Z")

</div>

Hi! Sorry for the late response.

You are almost there:

> curl -H “X-Auth-Token: V6RTUimYNgyroMFfY1zlUm2HHmke7Vj0WA99ODAOiu8”   
> -H “X-User-Id: avmX38wqkezv55obK”   
> [http://localhost:3000/api/v1/users.info?\*\*userId\*\*=DHm5KWrYSZoQpRyyJ](http://localhost:3000/api/v1/users.info? **userId** =DHm5KWrYSZoQpRyyJ)

check the casing for the query parameter userId

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [January 24, 2022, 1:40pm UTC](https://forums.rocket.chat/t/how-to-get-user-info-tried-rc-api-v1-users-info-userid-user-id-here/13070/4 "2022-01-24T13:40:47Z")

</div>

for reference:

> **[Get User's Info](https://developer.rocket.chat/reference/api/rest-api/endpoints/team-collaboration-endpoints/users-endpoints/get-users-info#other-users-example-call)**

---

<div class="post-metadata">

**Author:** ![nishlashakya](https://avatars.discourse-cdn.com/v4/letter/n/bc79bd/32.png) [@nishlashakya](https://forums.rocket.chat/u/nishlashakya)\
**Post date:** [January 26, 2022, 4:01am UTC](https://forums.rocket.chat/t/how-to-get-user-info-tried-rc-api-v1-users-info-userid-user-id-here/13070/5 "2022-01-26T04:01:24Z")

</div>

when I call it with **userId** i get following even for admin user

```auto
{
    "success": false,
    "error": "Cannot set property 'canViewAllInfo' of undefined"
}

```

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [January 26, 2022, 12:14pm UTC](https://forums.rocket.chat/t/how-to-get-user-info-tried-rc-api-v1-users-info-userid-user-id-here/13070/6 "2022-01-26T12:14:26Z")

</div>

Can you reproduce this with the curl command I mentioned?

Have you tried this curl example?

---

<div class="post-metadata">

**Author:** ![nishlashakya](https://avatars.discourse-cdn.com/v4/letter/n/bc79bd/32.png) [@nishlashakya](https://forums.rocket.chat/u/nishlashakya)\
**Post date:** [January 31, 2022, 7:52am UTC](https://forums.rocket.chat/t/how-to-get-user-info-tried-rc-api-v1-users-info-userid-user-id-here/13070/7 "2022-01-31T07:52:20Z")

</div>

can we get users from their email?

---

<div class="post-metadata">

**Author:** ![nishlashakya](https://avatars.discourse-cdn.com/v4/letter/n/bc79bd/32.png) [@nishlashakya](https://forums.rocket.chat/u/nishlashakya)\
**Post date:** [January 31, 2022, 9:04am UTC](https://forums.rocket.chat/t/how-to-get-user-info-tried-rc-api-v1-users-info-userid-user-id-here/13070/8 "2022-01-31T09:04:00Z")

</div>

also, can we log in from the email id which we register?

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [February 3, 2022, 6:50pm UTC](https://forums.rocket.chat/t/how-to-get-user-info-tried-rc-api-v1-users-info-userid-user-id-here/13070/9 "2022-02-03T18:50:25Z")

</div>

Please, check this document on how to query our APIs:

> **[Query and Fields](https://developer.rocket.chat/reference/api/rest-api/endpoints/other-important-endpoints/query-and-fields-info)**

---

<div class="post-metadata">

**Author:** ![dudanogueira](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/dudanogueira/32/2529_2.png) [@dudanogueira](https://forums.rocket.chat/u/dudanogueira)\
**Post date:** [February 3, 2022, 6:52pm UTC](https://forums.rocket.chat/t/how-to-get-user-info-tried-rc-api-v1-users-info-userid-user-id-here/13070/10 "2022-02-03T18:52:50Z")

</div>

Yes, you can:

> **[Login](https://developer.rocket.chat/reference/api/rest-api/endpoints/other-important-endpoints/authentication-endpoints/login)**
