Getting full list of contacts from Hubspot API
Hubspot's API allows you retrieve a list of contacts, however it only allows a max of 100 per call. I do that with this call: $contacts_batch1 = $contacts->get_all_contacts(array( 'count' => '100')); And then if I want to get the next 100 I do this: $offset1 = $contacts_batch1->{'vid-offset'}; $contacts_batch2 = $contacts->get_all_contacts(array('count' => '100', 'vidOffset'=>$offset1)); I am trying to get all the contacts without having to create a new variable each time I want the next 100. My first question would be how would I go about getting the vid-offset of the last set, and then how