# difference between user\_id and hub\_id

**URL:** <https://community.hubspot.com/t/difference-between-user-id-and-hub-id/13874>\
**Category:** APIs & Integrations\
**Tags:** oauth\
**Created:** [April 5, 2019, 7:08pm UTC](https://community.hubspot.com/t/difference-between-user-id-and-hub-id/13874 "2019-04-05T19:08:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![max12345](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/max12345/32/73373_2.png) [@max12345](https://community.hubspot.com/u/max12345)\
**Post date:** [April 5, 2019, 7:08pm UTC](https://community.hubspot.com/t/difference-between-user-id-and-hub-id/13874/1 "2019-04-05T19:08:03Z")

</div>

what is the difference between **hub\_id** and **user\_id** field in [this](https://developers.hubspot.com/docs/methods/oauth2/get-access-token-information) api

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Fmethods%2Foauth2%2Fget-access-token-information)**

seems like **hub\_id** from above and **portalId** from [this](https://developers.hubspot.com/docs/methods/owners/get_owners) api are same

[https://developers.hubspot.com/docs/methods/owners/get\_owners](https://developers.hubspot.com/docs/methods/owners/get_owners)

does it mean the user with user\_id is part of the portal (or hub) - like a user of an organization ?

questions:

1. can a user be identified using user\_id ?
2. can the logged in user’s organization be identified using portal\_id

---

<div class="post-metadata">

**Author:** ![JasminLin](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jasminlin/32/99730_2.png) [@JasminLin](https://community.hubspot.com/u/JasminLin)\
**Post date:** [April 8, 2019, 8:21am UTC](https://community.hubspot.com/t/difference-between-user-id-and-hub-id/13874/2 "2019-04-08T08:21:00Z")

</div>

Hi @max12345 , the hub\_id is the portal ID. When you create an account with HubSpot, whether its a free, paid or developer account, there will be an ID associated to it and that is the portal ID. It can be found in the URL when you are logged in to your account in HubSpot. You are also correct that it is the same as the portalId found in the owners API.

The user\_id is the ID of a specific HubSpot user in that portal ID. In the get access token info API endpoint, the user\_id and user fields is the HubSpot user that the token was created for. This user\_id is the same as the remoteId found in the [get owners](https://developers.hubspot.com/docs/methods/owners/get_owners) API endpoint. You are correct that this user would be a user in the portal.

---

<div class="post-metadata">

**Author:** ![max12345](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/max12345/32/73373_2.png) [@max12345](https://community.hubspot.com/u/max12345)\
**Post date:** [April 8, 2019, 10:34am UTC](https://community.hubspot.com/t/difference-between-user-id-and-hub-id/13874/3 "2019-04-08T10:34:15Z")

</div>

@JasminLin : Thanks for the clarification.
