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
Unable to forward calls using API
Tags: rest api, call forwarding, webhooks
Jan 23, 2024 at 10:31pm   •   2 replies  •  0 likes
Kenneth Toh

I upgraded to the latest RingCentral PHP SDK to support the JWT auth. Using the same code but modified to authenticate with JWT, it now fails to forward calls when the Webhook is triggered by the incoming call. Session and party IDs are from the Webhook data send by RingCentral.

The following error was thrown. Do you know what is causing this?

[24-Jan-2024 17:45:18 Australia/Sydney] PHP Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `POST https://platform.ringcentral.com/restapi/v1.0/account/~/telephony/sessions/s-a0d854f1c5bd0z18d3a37330bz1071d5a0000/parties/p-a0d854f1c5bd0z18d3a37330bz1071d5a0000-2/forward` resulted in a `403 Forbidden` response:

{

"errors" : [

{

"errorCode" : "TAS-106",

"message" : "Operation is not allowed"

}

] (truncated...)

in /var/www/html/ring-central/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113

Stack trace:

#0 /var/www/html/ring-central/vendor/guzzlehttp/guzzle/src/Middleware.php(72): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response), NULL, Array, NULL)

#1 /var/www/html/ring-central/vendor/guzzlehttp/promises/src/Promise.php(209): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Response))

#2 /var/www/html/ring-central/vendor/guzzlehttp/promises/src/Promise.php(158): GuzzleHttp\Promise\Promise::callHandler(1, Object(Gu in /var/www/html/ring-central/vendor/ringcentral/ringcentral-php/src/Http/Client.php on line 52




2 Answers
answered on Jan 24, 2024 at 2:22pm  

Using the token generated by the user that RingCentral used to trigger the Webhook fixes the problem.

Thanks.


 0
answered on Jan 24, 2024 at 7:24am  

Make sure the JWT token is generated by the user extension who receives the call. Call forwarding cannot be handled by other (even a super admin user) user extension than the owner of the call.


 1



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