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?
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.