# What is the user id for /api/v2/users/{id} endpoint?

**URL:** <https://community.auth0.com/t/what-is-the-user-id-for-api-v2-users-id-endpoint/78196>\
**Category:** Get Help\
**Created:** [February 13, 2022, 6:00pm UTC](https://community.auth0.com/t/what-is-the-user-id-for-api-v2-users-id-endpoint/78196 "2022-02-13T18:00:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karunamay](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/karunamay/32/35180_2.png) [@Karunamay](https://community.auth0.com/u/Karunamay)\
**Post date:** [February 13, 2022, 6:00pm UTC](https://community.auth0.com/t/what-is-the-user-id-for-api-v2-users-id-endpoint/78196/1 "2022-02-13T18:00:57Z")

</div>

Here is what I am trying to do…

I implemented Twitter social login and it is working fine. However, I also want the `access_token`(which is generated by Twitter, not Auth0 I guess) to correspond to that user. After digging the docs I found this `/api/v2/users/{id}` endpoint. I have already generated `access_token` for management API and I’ll call the endpoint from my server.

I am using React and using the hooks. And here is the user object I am getting in the front-end.

`{ "nickname": "Karunamay Murmu", "name": "Karunamay Murmu", "picture": "https://pbs.twimg.com/profile_images/875906814608539649/wrGtt_Qq_normal.jpg", "updated_at": "2022-02-13T14:40:11.652Z", "sub": "twitter|875905303245729793" }`

I don’t get any `id` property If the `id` is supposed to be here. If not how I can get the ID?

Also, I didn’t understand the line below from the docs

> The user becomes authenticated with the identity provider when an HTTP `GET` call to the `/api/v2/users` [endpoint](https://auth0.com/docs/api/management/v2/#!/Users/get_users_by_id) occurs.

Isn’t the user already authenticated when they authorize my app from Twitter as well as Auth0 during login?

---

<div class="post-metadata">

**Author:** ![markd](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markd/32/38919_2.png) [@markd](https://community.auth0.com/u/markd)\
**Post date:** [February 14, 2022, 5:27pm UTC](https://community.auth0.com/t/what-is-the-user-id-for-api-v2-users-id-endpoint/78196/2 "2022-02-14T17:27:53Z")

</div>

Hello @Karunamay. The `sub` claim in the ID token is the `user_id`.

`/api/v2/users/twitter%7C875905303245729793`

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 22, 2022, 2:23pm UTC](https://community.auth0.com/t/what-is-the-user-id-for-api-v2-users-id-endpoint/78196/3 "2022-02-22T14:23:28Z")

</div>

Teamwork makes the dreamwork!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 22, 2022, 2:23pm UTC](https://community.auth0.com/t/what-is-the-user-id-for-api-v2-users-id-endpoint/78196/4 "2022-02-22T14:23:31Z")

</div>


