News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Authentication Intermittently failing PHP SDK
Tags: authentication
Dec 1, 2019 at 9:06pm   •   4 replies  •  0 likes
Nigel McLaughlin

I have an issue that can be consistently recreated via the PHP SDK.

When trying to authenticate my Sandbox account, 2 out of 3 login attempts will fail with an unrecoverable error.

[02-Dec-2019 15:50:36 Australia/Melbourne] PHP Fatal error:  Uncaught Exception: Serialization of 'Closure' is not allowed in [no active file]:0
Stack trace:
#0 {main}
  thrown in [no active file] on line 0
[02-Dec-2019 15:50:39 Australia/Melbourne] PHP Fatal error:  Uncaught Exception: Serialization of 'Closure' is not allowed in [no active file]:0
Stack trace:
#0 {main}
  thrown in [no active file] on line 0
[02-Dec-2019 15:50:42 Australia/Melbourne] PHP Fatal error:  Uncaught Exception: Serialization of 'Closure' is not allowed in [no active file]:0
Stack trace:
#0 {main}
  thrown in [no active file] on line 0
[02-Dec-2019 15:50:45 Australia/Melbourne] PHP Fatal error:  Uncaught Exception: Serialization of 'Closure' is not allowed in [no active file]:0
Stack trace:
#0 {main}
  thrown in [no active file] on line 0
[02-Dec-2019 15:50:47 Australia/Melbourne] PHP Fatal error:  Uncaught Exception: Serialization of 'Closure' is not allowed in [no active file]:0
Stack trace:
#0 {main}
  thrown in [no active file] on line 0
[02-Dec-2019 15:50:51 Australia/Melbourne] PHP Fatal error:  Uncaught Exception: Response has unsuccessful status in /vendor/ringcentral/ringcentral-php/src/Http/Client.php:44
Stack trace:
#0 /vendor/ringcentral/ringcentral-php/src/Platform/Platform.php(329): RingCentral\SDK\Http\Client->send(Object(GuzzleHttp\Psr7\Request))
#1 /vendor/ringcentral/ringcentral-php/src/Platform/Platform.php(465): RingCentral\SDK\Platform\Platform->sendRequest(Object(GuzzleHttp\Psr7\Request), Array)
#2 /vendor/ringcentral/ringcentral-php/src/Platform/Platform.php(221): RingCentral\SDK\Platform\Platform->requestToken('/restapi/oauth/...', Array)
#3 /_classes/TelephonyRingCentral.class.php(55): RingCentral\SDK\Platform\Platform->login(Array, '', 'some_password')
#4 /Users/nigelmclaughlin/Documents/WIP/REAS_ in /vendor/ringcentral/ringcentral-php/src/Http/Client.php on line 52

The credentials haven't changed in between. If I try again, sometimes it's successful and sometimes it isn't.

Has anyone else experienced this issue?

4 Answers
answered on Dec 8, 2019 at 11:45am  

429 is as you discovered a rate limiting issue which actually restrict the API from multiple call for a certain number of time.

There is an official docs available which will help you to understand how this rate limit works and how can you avoid or fix with usage policy :

https://developers.ringcentral.com/guide/basics/rate-limits


 0
answered on Dec 3, 2019 at 8:16am  

How to deal with 429 response would be the answer.


 0
answered on Dec 2, 2019 at 6:41pm  

After digging into the SDK code it turns out it's returning a 429 error due to rate limiting and throwing an exception due to this.


 0
answered on Dec 1, 2019 at 10:08pm  

Hi, This is purely a serialization issue. Are you using Closure or it is coming from PHP SDK? Please have a look at the below link.

https://stackoverflow.com/questions/13734224/exception-serialization-of-closure-is-not-allowed

Meanwhile, you can open a support ticket with the RingCentral developer support team.


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us