question

Anthony Gigliotti avatar image
Anthony Gigliotti asked Phong Vu answered

Uncaught Exception Response has unsuccessful status

Getting the following error after having built a php site that calls the ringcentral API. First the php site gets the extension list of a couple of users, then it allows the user to remove or update the forwarding number. Could it be that we are running up against a request limit? Maybe performing a login for every request could be unnecessary and it appears 5 logins per minute is the limit? The error is as follows (doesn't seem to indicate what type of error is happening)

Fatal error: Uncaught exception 'Exception' with message 'Response has unsuccessful status' in /var/www/html/Ppt_combined_2/public_html/application/third_party/ringcentral/vendor/ringcentral/ringcentral-php/src/Http/Client.php:33 Stack trace: #0 /var/www/html/Ppt_combined_2/public_html/application/third_party/ringcentral/vendor/ringcentral/ringcentral-php/src/Platform/Platform.php(214): RingCentral\SDK\Http\Client->send(Object(RingCentral\Psr7\Request)) #1 /var/www/html/Ppt_combined_2/public_html/application/third_party/ringcentral/vendor/ringcentral/ringcentral-php/src/Platform/Platform.php(301): RingCentral\SDK\Platform\Platform->sendRequest(Object(RingCentral\Psr7\Request), Array) #2 /var/www/html/Ppt_combined_2/public_html/application/third_party/ringcentral/vendor/ringcentral/ringcentral-php/src/Platform/Platform.php(123): RingCentral\SDK\Platform\Platform->requestToken('/restapi/oauth/...', Array) #3 /var/www/html/Ppt_combined_2/public_html/application/views/mobile/RC_get_api_response.php(26): RingCentral\SDK\Platfo in /var/www/html/Ppt_combined_2/public_html/application/third_party/ringcentral/vendor/ringcentral/ringcentral-php/src/Http/Client.php on line 44

apierrorsextension apilimit
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Phong Vu avatar image
Phong Vu answered

You mentioned that there are several API calls. So which API call failed with these error?

Can you post a few line of code where you call an API that failed. And also did you try to print the error message like this too?

try{
  $platform->get(...);
  ...
}catch (\RingCentral\SDK\Http\ApiException $e) {
  // Getting error messages using PHP native interface
  print 'Expected HTTP Error: ' . $e->getMessage() . PHP_EOL;
}



1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys