1 to 2 of 2
Yo, all the other API calls I've tried at work, but when I do a GET request for "person" (the whole list) I get an empty response but no errors. My API key is for a Manager user-type, which is said to have permissions to this resource. But I get an empty list where I would expect to get all our employees.
If I change the spelling to "persony" to test for errors, I do get an error, so that tells me that something else might be going on.
I've tried this a few ways and I can't seem to recreate your particular error. Let me show you how I'm doing it and see if maybe there's something missing. This code is in PHP, so yours may differ slightly, but the gist of it is the same:
$headers = array(
// create a curl request
$c = curl_init('https://api.myintervals.com/person/?active=t');
curl_setopt($c, CURLOPT_USERPWD, '___token___:X');
curl_setopt($c, CURLOPT_HTTPHEADER, $headers);
curl_setopt($c, CURLOPT_HEADER, 0);
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($c, CURLOPT_HTTPGET, true);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_FOLLOWLOCATION, 1);
$return = curl_exec($c);
If you're still encountering problems, you can email me at email@example.com with your company name and user name, and I will try to diagnose if there's an issue with your account.
1 to 2 of 2
Comments are closed.
For more Intervals help documentation, please visit help.myintervals.com