APIs & Integrations

catalinsendsms
Participante

How to identify diferent hubspot users from a CRM extension?

resolver

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: 

catalinsendsms_0-1609748931043.png

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

0 Me gusta
1 Soluciones aceptada
jackcoldrick
Solución
HubSpot Employee
HubSpot Employee

How to identify diferent hubspot users from a CRM extension?

resolver

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

 

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn

Ver la solución en mensaje original publicado

2 Respuestas 2
jackcoldrick
Solución
HubSpot Employee
HubSpot Employee

How to identify diferent hubspot users from a CRM extension?

resolver

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

 

Jack Coldrick
Solutions Engineer @ HubSpot
Add me on LinkedIn
catalinsendsms
Participante

How to identify diferent hubspot users from a CRM extension?

resolver

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

0 Me gusta