When I run it returns a list of all users. I dont know how to seperate them. I already checked https://developers.intercom.com/intercom-api-reference/reference#list-users but it didn't really help.
I haven't really tried anything yet since i dont even know where to start.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.intercom.io/users");
$headers = [
'Authorization:Bearer key',
'Accept: application/json',
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$server_output = curl_exec($ch);
curl_close($ch);
It returns
"pages":{"type":"pages","next":null,"page":1,"per_page":50,"total_pages":1},"total_count":7,"limited":false,"type":"user.list","users":[{"type":"user","id":"5d8b1a7422b912ea9149d7b0","user_id":"42069","anonymous":false,"email":"xdxd@mynamejeff.nl","phone":"2112321","name":"Jeff","pseudonym":null,"avatar":{"type":"avatar","image_url":null},"app_id":"xco2b8a7","companies":{"type":"company.list","companies":[]},"location_data":
It returns this for every user (so just imagine this x10).