APIs & Integrations

PJMuller
Member

Uniqueness of Hub / Portal ID (vs User ID)

Hi all,

 

I've read https://community.hubspot.com/t5/APIs-Integrations/difference-between-user-id-and-hub-id/td-p/263633 but I'm still in doubt.

 

My question is whether I can use the Portal (a.k.a. Hub ID) as a unique identifier for someone who connected via oauth to our extension instead of User ID.

 

So far I had been using the user ID (from endpoint [GET] api.hubapi.com/oauth/v1/access-tokens/:accessToken)

but in webhooks we receive only the Portal ID...

 

Can someone shine some light (and maybe give an example) of what values to expect for Portal and User IDs?

 

Greetings!

0 Upvotes
PJMuller
Member

Uniqueness of Hub / Portal ID (vs User ID)

@webdew , could check my follow up question please :)?

or anyone else willing to clarify? Would be greatly appreciated!

0 Upvotes
PJMuller
Member

Uniqueness of Hub / Portal ID (vs User ID)

Hi @webdew , thanks for your answer, I don't fully understand it though (most likely because I'm new into hubspot).

 

A) Could you give an example that illustrates it.

B) From what I read this is what I understand, am I on the right track?
- the userID will be the same for all (oauth) apps he/she uses

- the portalID will be unique per (oauth) authorized app

0 Upvotes
webdew
Guide | Diamond Partner
Guide | Diamond Partner

Uniqueness of Hub / Portal ID (vs User ID)

Hi @PJMuller ,

yes you can use portal id as a unique identifier .By using portal id as a unique identifer you will create your app portal based which you can share with other users where as if you create your application based on user_id as uniques identifier then you will not be able to share your app between diiferent users by sharing your same portal.

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.