APIs & Integrations

BrianF
Member

Get contacts on a list returns no data

When using: https://api.hubapi.com/contacts/v1/lists/1/contacts/1045?hapikey=myKey

where 1045 = the list ID, I get no records returned, just: {“contacts”:[],“has-more”:false,“vid-offset”:0}

0 Upvotes
4 Replies 4
Not applicable

Get contacts on a list returns no data

I am trying to get all contacts but is not working: this URL worked in the past:
https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=myKey

the result is: {“contacts”:[],“has-more”:false,“vid-offset”:0}

0 Upvotes
Not applicable

Get contacts on a list returns no data

Found that I’ve used a not correct hapikey.

Here is the page to get the good one: https://knowledge.hubspot.com/articles/kcs_article/integrations/how-do-i-get-my-hubspot-api-key

BrianF
Member

Get contacts on a list returns no data

That worked thank you, looks like I had the list id in the wrong place :slight_smile:

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Get contacts on a list returns no data

@BrianF that URL looks incorrect. If you wanted to get all of the contacts in the list with ID 1045, the URL would be:
https://api.hubapi.com/contacts/v1/lists/1045/contacts/all?hapikey=myKey

0 Upvotes