APIs & Integrations

g_isabella
Member

Pagination of contacts list not working

Currently I’m trying to get all the contacts in a contact list and need to paginate through the list. However the vidoffset parameter does not seem to be working. Updating the call with the parameter vidoffset return the same list and not the next “page”.
This is the endpoint I’m calling: /contacts/v1/lists/:list_id/contacts/all
And the parameter is vidOffset.

Help!

0 Upvotes
4 Replies 4
David_Meyer
Member

Pagination of contacts list not working

Has there been any update on this issue…I am having the same trouble. I am using the contacts API, and making a call with limit=1 returns a true value of has-more and an vid-Offset value. When I include the vid-Offset value in a new request, I get exactly the same payload.

Thanks!

Initial API call (w/o API Key)
https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=<>&property=name&count=1
Returns: has-more:True and vid-Offset=12551

Next Call:
https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=<>&property=name&vid-Offset=12551&count=1
Returns: has-more:True and vid-Offset=12551

These calls have the same payload.

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Pagination of contacts list not working

@David_Meyer can you DM me your portal ID? That way I can try and reproduce it on my end.

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Pagination of contacts list not working

@David_Meyer I should have caught this earlier. The issue is that the query parameter is

vidOffset

NOT

vid-Offset

Please try it using just vidOffset and let me know if that works. I have it working on my end as expected with that change. My apologies for not seeing that earlier

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Pagination of contacts list not working

@g_isabella can you show me the call you are making with all the query list parameters in it? It is hard to troubleshoot your issue with out the call you are making.

It should look similar to this

https://api.hubapi.com/contacts/v1/lists/226468/contacts/all?hapikey=demo&vidOffset=X

0 Upvotes