Skip to main content

We have implemented the RingCentral widget to receive calls in our Magento-powered website. For that, when an admin user logs into the website then they must also log into their RingCentral account from the widget or browser. Is there any API for that? So that when any admin user logs in then they are logged in automatically to RingCentral account based on their user credential?

It is a little unclear on what do you mean by "For that when admin user login to website than must login to ring central account for from widget or browser."
My assumption is that you want to login into the RingCentral account in the widget (without putting in the credentials) as soon as the user logs into your website.
The concern I see here is that your website and RingCentral widget share different auth credentials and mechanisms as they are 2 different entities.
I am also assuming that your widget is using 3 legged OAuth to authenticate and login the user.
@Himanshu Patel Could you confirm if my understanding/assumptions are correct?


The answer to your question is relatively complex, but let me see if I can break it down.

Simply put, there is no API to authenticate an arbitrary user to obtain a token to access their account. That would be a huge security risk. However, we do have solutions that I think will help you.

1. [JWT auth flow][1]. This is not the ideal auth flow for all use cases, but it does have the advantage of being able to access a user's account via the API without them being present or having to use a user interface. This auth mode was designed with server-to-server use cases in mind.

2. [Auth code flow][2]. This feels like the right solution for you, but what is missing from your solution (I think) is prompt your user to connect to their RC account, and then to implement a service to wake periodically to refresh your access keys to keep them fresh and prevent them from expiring.

One final solution worth mentioning, which might also be appropriate is using Okta. Okta is a third-party authentication and identity provider which can help facilitate single sign-on between different services you subscribe to, e.g. RingCentral, Magneto, etc.


[1]: https://developers.ringcentral.com/guide/authentication/jwt-flow
[2]: https://developers.ringcentral.com/guide/authentication/auth-code-flow

The embeddable widget support to customize authorization flow based on authorization code:https://github.com/ringcentral/ringcentral-embeddable/blob/master/docs/customize-authorization.md
You need to implement RingCentral authorization code flow in your side, then pass authorization code to embeddable for login.


We use https://github.com/ringcentral/ringcentral-js-widgets in out HTML page so how can use below method in HTML page?


Reply