News & Announcements User Community Developer Community

Welcome to the RingCentral Community

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

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
Fatal error: Call to undefined method
Tags: sdk
Mar 21, 2016 at 8:03am   •   6 replies  •  0 likes

Hi, I'm having a little dive into the PHP SDK and having followed the guidance on GitHub I'm getting...

"Fatal error: Call to undefined method RingCentral\SDK\SDK::getPlatform()"

When using: $sdk->getPlatform()->login('USERNAME', 'EXT', 'PASS');

If I use: $sdk->platform()->login('USERNAME', 'EXT', 'PASS');

I get "curl_close(): 52 is not a valid cURL handle resource in phar:"

Any ideas why I can't even validate and login?



6 Answers
answered on Mar 24, 2016 at 8:45am  
Yes, I too have had issues with self-signed certificates. If you just need a quick place to test that is not on your local machine, you can use Heroku (they support PHP) since the URL they provide you has a valid certificate chain available. Azure and GCP may also provide this feature, but I've not tested in those environments.

answered on Mar 24, 2016 at 2:40am  
Hi PHP version is 5.5.9 cURL is 7.30.0...

I've now got it working, it seems to be a problem with the test server having a self signed certificate, I was using $sdk->getPlatform()->login('USERNAME', 'EXT', 'PASS'); as its what was originally detailed on the github page... 



answered on Mar 23, 2016 at 10:33pm  
Hi James,

To authenticate the user you should be using :
$sdk->platform()->login('USERNAME', 'EXT', 'PASS');
Do you have composer installed ? If so, have you provided the appropriate path for the composer's autoloader.

For a simpler understanding, take a look at the "develop" branch on our official PHP-SDK repository on github titled "How to Demo" once you have installed the SDK using either composer/PHAR:

answered on Mar 23, 2016 at 10:48am  
Which version of cURL and PHP are you using please?

answered on Mar 22, 2016 at 4:18am  
Yes cURL is working fine, even testing with the following script.


// Script to test if the CURL extension is installed on this server

// Define function to test
function _is_curl_installed() {
    if  (in_array  ('curl', get_loaded_extensions())) {
        return true;
    else {
        return false;

// Ouput text to user based on test
if (_is_curl_installed()) {
  echo "cURL is <span style=\"color:blue\">installed</span> on this server";
} else {
  echo "cURL is NOT <span style=\"color:red\">installed</span> on this server";
Gives the following "cURL is installed on this server".



answered on Mar 21, 2016 at 11:12am  
Has your PHP installation been compiled with cURL support?


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

Developer Platform
Integrated Apps
App Gallery
Developer support
Games and rewards

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