APIs & Integrations

pkuppuswami
メンバー

GET ALL CONTACTS API - How to get Contacts for a Hubspot user

Hubspot user has special permissions to either View/EDIT/Communicate with Everything/Team/Owned contacts.

What is the parameter to be used in API call to get only the contacts viewable by the Hubspot user?

Thanks
Priya

3件の返信
Mike_Eastwood
キーアドバイザー | Gold Partner
キーアドバイザー | Gold Partner

GET ALL CONTACTS API - How to get Contacts for a Hubspot user

Hi Priya

You could create a Smart List (with all Contacts owned by a User) then use the Contacts Lists API to get all Contacts on the Smart List.

GET /contacts/v1/lists/:list_id/contacts/all (link to the docs)

This should make life easier for you.

Have fun
Mike

0 いいね!
pkuppuswami
メンバー

GET ALL CONTACTS API - How to get Contacts for a Hubspot user

Thanks for the quick response. Appreciate it.

Thanks
Priya

0 いいね!
robertainslie
HubSpot Employee
HubSpot Employee

GET ALL CONTACTS API - How to get Contacts for a Hubspot user

Hi @pkuppuswami,

There is not currently a HubSpot API to get contacts that cross-reference to the owner of that contact. When getting contacts via the API, you will return all contacts. In your external application you would need to build logic to only show contacts that a user should see, based on their combination of view/edit/communicate.

If you don't know he owner, you can find the owner ID in he HubSpot owner field, and then get all owners via this endpoint: https://developers.hubspot.com/docs/methods/owners/get_owners

0 いいね!