Himanshu Patel avatar image
Himanshu Patel asked Byrne Reese commented

Is there an API or way to auto-login a user to RingCentral when using RingCentral embeddable?

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?

rest apiauthenticationembeddable
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Yatin Gera avatar image Yatin Gera ♦♦ commented ·

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?

1 Like 1 ·
Himanshu Patel avatar image Himanshu Patel Yatin Gera ♦♦ commented ·

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 ?

0 Likes 0 ·
Byrne Reese avatar image
Byrne Reese answered

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. 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. 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 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Embbnux Ji avatar image
Embbnux Ji answered Byrne Reese commented

The embeddable widget support to customize authorization flow based on authorization code:
You need to implement RingCentral authorization code flow in your side, then pass authorization code to embeddable for login.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Himanshu Patel avatar image Himanshu Patel commented ·

We use in out HTML page so how can use below method in HTML page?

0 Likes 0 ·
Embbnux Ji avatar image Embbnux Ji Himanshu Patel commented ·

For "JS widgets" lib, you can just call "phone.auth.login({code: 'user_authorization_code'})"

0 Likes 0 ·
Himanshu Patel avatar image Himanshu Patel Embbnux Ji commented · there is no any function like phone.auth.login

0 Likes 0 ·
Show more comments

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys