Hi,
Not sure if I'm going about this the wrong way, but I'm trying to create a pretty basic bulk faxing app using PHP - open a CSV file with a list of phone numbers and send to all etc. The basic functionality of sending a fax works fine in my sandbox, but I'm struggling to find more info on what else I need to do, specifically related to rate limits and such. I should also ask if there is already an implementation of this somewhere I can just use - didn't find anything particularly useful on the RingCentral Apps or on Github.
I know there are rate limits of 10 on my 'heavy' call. Is this all faxes, or is this because I have a certain size of attachment? Either way, when I send, do I have to keep track of the limit, and once it hits 10 in 1 60 second period tell it to sleep for 59 seconds, or does the SDK do all of that and it will just continue sending when it's able to? If I do need to keep track of it, how do I get the info out of the response? In debugging, I have been able to see the info like X-Rate-Limit-Group etc, but can't figure out how to do it with code. I've tried things like $resp->_response (but _response is not available to be queried like this), $resp->getHeaders(), $resp -> getHeader('X-Rate-Limit-Limit').
$resp->json() only gives me the _jsonAsObject which does not include the _response object, so doesn't have the headers I need.
Given
$resp = $platform->sendRequest($request);
json_encode($resp);
gives me a blank array.
What am I doing wrong? Is there anything else I need to know?
Thanks in advance.