I'm trying to create one big json file with all my contacts. Since the API returns max 100 contacts I have to work with pagination. My lack in php knowledge let me in the dark of how to achieve this. Can anyone point me in the right direction here?
What I have so far:
$limit = 100;
$apikey = "xxxxx";
$feed_url = "https://api.hubapi.com/contacts/v1/lists/all/contacts/recent?hapikey=". $apikey .'&count='. $limit;
$feed_json = file_get_contents( $feed_url );
$feed_array = json_decode( $feed_json );
// Here I go on and read the data etc.
My question is: how do I go trough 300 contacts and put them into 1 array (json).
Thanks so much.