How to identify diferent hubspot users from a CRM extension?

I need to make a CRM extension for my API, but I am cannot understand how to identify different HubSpot users. I was reading here and I found this line:

35869iA7B707F986198801.png

Is the userId the same user_id I get when I call this (https://api.hubapi.com/oauth/v1/access-tokens/) endpoint?

Hi @catalinsendsms,

Every Hubspot user has a “userID” and a “userEmail”. These can be retrieved using the “Owners API”. For instance when I’m using the CRM Extension with my own application and I load a record in the CRM I can see the following query string parameters:

&associatedObjectType=CONTACT
&portalId=7248615
&userEmail=jackcoldrick%40hubspot.com
&userId=3975103

If I make a GET request to “https://api.hubapi.com/owners/v2/owners” (The Owners API) it returns:

 {
 "portalId": 7248615,
 "ownerId": 44782397,
 "type": "PERSON",
 "firstName": "Jack",
 "lastName": "Coldrick",
 "email": "jackcoldrick@hubspot.com",
 "createdAt": 1583193141650,
 "updatedAt": 1583919235737,
 "signature": "",
 "remoteList": [],
 "hasContactsAccess": false,
 "activeUserId": 3975103,
 "userIdIncludingInactive": 3975103,
 "isActive": true
 }

There is a lot of additional information in the response but the most important in your instance would be the “activeUserId” and “email”.

I hope this helps.

Jack

I get the same information when the user clicks on an action button? @jackcoldrick