When I try to fetch all contacts I will always face an issue at 10,000…
When you try to offset more than 10,000 there will be
“[502] Body buffer overflow” error.
The same error happens with V2, when you set 10,000th ID as page_token.
Still the same error at first offset when I tried to reverse the order.
i.e)
×/rest/v1/contacts?order_by=id&order_direction=ascending&offse=10000
×/rest/v1/contacts?order_by=id&order_direction=descending&offse=1000
×/rest/v2/contacts?order_by=id&page_token=44978(10,000th Contact ID)
Is there no way with Keap API to get all contacts??
Work around solution would be try sorting the list by different fields, which is not ideal.
If you are really need to pull all the data, then you can use the XML-RPC API instead.
In the worse case scenario that the XML-RPC fails as well, then it sounds like you may have large amounts of data being stored in the Contacts. You can limit the amount of Contacts being queried to see if it improves things.
My guess is this is a data issue. Something in that page of data is probably causing issues making the response too big. Please file a ticket so support can take a look at it.