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
Using PHP-SDK, getting error 500
Tags: sdk
Jul 11, 2022 at 1:08pm   •   2 replies  •  0 likes
ken-nye

Im tying to use the PHP-SDK to upload a greeting, I installed the SDK but Im getting error 500 every time I use any script. If I just have a basic PHP page, they load fine. Is there a way of testing the installation of the SDK?

2 Answers
answered on Jul 12, 2022 at 8:00am  

 0
on Jul 12, 2022 at 10:55am   •  0 likes

thanks, that worked, now I have a more basic PHP issue. Im not a pro at PHP, but Im trying. Im trying to get basic extension information working. I got this code from the 'try it now' I get no errors and a blank page, I assume I need more code to view the response.

require('vendor/autoload.php');
$rcsdk = new RingCentral\SDK\SDK($client_id, $client_secret, RingCentral\SDK\SDK::SERVER_SANDBOX);$platform = $rcsdk->platform();
$platform->login($Accountnumber, $extension, $pw);
$r = $platform->get("/restapi/v1.0/account/{$accountId}/extension", $queryParams);
// PROCESS RESPONSE

I tried to add this code , but it still comes back blank

foreach ($r as $value){ 
  echo "value " .$value . "
";
} 

any help would be much appreciated.

on Jul 14, 2022 at 9:16am   •  0 likes

Try this after logged in. And don't hardcode the account id as you may make a mistake, use the tilde instead and the system will detect the account id based on the access token.

$resp = $platform->get('/account/~/extension/?page=1&perPage=1000');
foreach ($resp->json()->records as $record)
  print_r (json_encode($record, JSON_PRETTY_PRINT) . "\n");
on Jul 14, 2022 at 12:11pm   •  0 likes

thanks, that worked perfect

answered on Jul 11, 2022 at 3:05pm  

I found the logs and this is the error

[11-Jul-2022 14:50:38 America/Los_Angeles] PHP Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: self signed certificate in certificate chain (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://platform.devtest.ringcentral.com/restapi/oauth/token in C:\SNC\php\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:211

how to a get around this problem?


 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