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
Web-phone-js integration with external system using Admin JWT authentication.
Tags: integrations
Jul 30, 2023 at 10:26pm   •   1 replies  •  0 likes
Icore Software Technologies

I have a Lead management system; I need to integrate Ringcentral with that.

When a staff clicked a lead call button, start the call from browser. and also they need to take an incoming call from browser. If the staff is not available in front of the system, Call will forward to the phone we already mapped.

I am the admin of this Lead manager and I will configure the Ringcentral App details in LeadManager Settings. Staff don't need to authenticate with Ringcentral again.

1. Is this possible with RingCentral ?

2. I tried with web phone JS, But it looks like need to authenticate for each user.

3. I am using PHP & JS for implement this. When I configure app credentials in JS, public can access that. Instead, any option to authenticate from server and use token for JS ? And I noticed only 5 auth request limit also there.

Someone please assist me with this issue.

1 Answer
answered on Jul 31, 2023 at 2:31pm  

I think you can do that if you implement the authentication using JWT token in the backend and provide a secure way to get the valid tokens from the backend whenever you need to call the platform APIs.

To do that, remove the login function from the client side, and provide a method to get the tokens (you will have to handle multiple users to make sure that your backend returns the right tokens to the right user). Once you have a valid tokens, set the tokens to the platform object and call any API. Here is my untested example. /getToken is your server method that login and return the tokens object.

function getTokens(userId) {
    var getting = $.get( `getToken?userId=userId` );
    getting.done(function( res ) {
      if (res.status == "ok") {
          platform = sdk.platform();
                        await platform.auth().setData(res.tokens)
                        // Call platform API
      }else if (res.status == "error"){
        // handle error

on Jul 31, 2023 at 9:27pm   •  0 likes

Thanks for the support, I will try this way, and update here.

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