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?
for implement & access phone in ring central widget in our website need to login ring central account. So is there any way to auto login so direct receive & make call from widget ?
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?
For "JS widgets" lib, you can just call "phone.auth.login({code: 'user_authorization_code'})"
https://github.com/ringcentral/ringcentral-embeddable there is no any function like phone.auth.login
The ringcentral-embeddable library and the ringcentral-js-widgets are different. I am not too familiar with js-widgets. Can you describe in more detail what you are trying to build, then perhaps we can help you find the optimal library and then show you how to auth using that library.
In either scenario though, you will we doing a 3-legged auth token flow. This is a classic OAuth flow in which a user clicks login, gets directed to RingCentral.com to login, authorizes the app, then returns the user to your app which then obtains the auth token and sets it in the widget/component via JS. Then the client (either a widget or embeddable) can make API calls.
Hi @Himanshu Patel "phone.auth.login" is for app built from js widgets lib.
If you are using embeddable widget, you should follow https://github.com/ringcentral/ringcentral-embeddable/blob/master/docs/customize-authorization.md to customize authorization.
For get code i use https://platform.devtest.ringcentral.com/restapi/oauth/authorize?response_type=code&redirect_uri=https://www.ms.com/add.php&client_id=<CLIENTID>&display=&prompt=code_challenge=_MZEI9FtFf31e2EkTdVL4i0EkX7R5o37oMOs6Zyh3YM&code_challenge_method=S256 URL where shown response as "No redirect uri is registered for the client" while my app configure with "Password-based auth flow" so where to configure ir?
It appears your app is misconfigured. It needs to be configured to use the "3-legged OAuth flow authorization code" options for REST API apps.
Currently the embeddable widget doesn't support password auth flow with iframe API. It only supports authorization code auth flow (3-legged OAuth flow).
We can add API to let the embeddable support password flow. But the password grant flow only work for private RingCentral app (only working at your own RingCentral account). Can you share why you need password flow? Are you building private RingCentral app?
When I try to get code URL for login than return error "Single Sign-on is not yet enabled for this user account. Please contact your company administrator." please suggest any simple way to login with embedded widget
Do you test app in Sandbox environment or production? Sandbox account is independent with production account. It error show your account is not enabled for Single Sign-on. If you are testing at sandbox, you need to enter your email or phone number to login.
When try to single sign than shown error as "Single Sign-on is not yet enabled for this user account. Please contact your company administrator."
It should that your account don't support to login with Single Sign-On at RingCentral login. You should just input email or phone number to login.
You can try to run "phone.auth.login({password: '', username: ''})" in the embeddable widget iframe scope with chrome developer tool to try password grant flow. It only works when you pass your own client id (need to support password grant flow) and secret to the embeddable. https://github.com/ringcentral/ringcentral-embeddable/blob/master/docs/config-client-id-and-secret.md
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.
JWT auth flow. 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.
Auth code flow. 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.
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