APIs & Integrations

max12345
Participant

difference between user_id and hub_id

SOLVE

what is the difference between hub_id and user_id field in this api

https://developers.hubspot.com/docs/methods/oauth2/get-access-token-information

 

seems like hub_id from above and portalId from this api are same

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
0 Upvotes
1 Accepted solution
JasminLin
Solution
HubSpot Employee
HubSpot Employee

difference between user_id and hub_id

SOLVE

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 API endpoint. You are correct that this user would be a user in the portal. 

View solution in original post

2 Replies 2
JasminLin
Solution
HubSpot Employee
HubSpot Employee

difference between user_id and hub_id

SOLVE

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 API endpoint. You are correct that this user would be a user in the portal. 

max12345
Participant

difference between user_id and hub_id

SOLVE

@JasminLin : Thanks for the clarification.

 

0 Upvotes