Get contacts on a list returns no data


#1

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}


#2

@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


#3

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


#4

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}


#5

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