We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Jul 10, 2021 7:41 AM
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!
Jul 29, 2021 2:09 AM
@webdew , could check my follow up question please :)?
or anyone else willing to clarify? Would be greatly appreciated!
Jul 13, 2021 2:40 PM - edited Jul 13, 2021 2:40 PM
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
Jul 13, 2021 6:50 AM
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.