question

Prakash Kolipaka avatar image
Prakash Kolipaka asked ·

Can we login in Javascript webphone app without reaching Ringcentral Authentication server?

We are implementing Web-phone of Ring central for which we have created a sandbox account and added digital line to it.

As we took the reference with the Auth flow from Demo Application, we are supposed are do below steps

1) After entering Client Id, Client Secret and Submitting the form.

2) Login using Phone number & Password of the Console App .3) Once logged in , We need to click a button Authorize .4) Once authorized, We need to confirm the Emergency Address.

The above steps 2, 3, 4 are happening in a different page(urls) which we cannot skip.

The challenge is as we need to implement this in our own web application, we should not have these 2, 3, 4 steps to be happening in other pages.

Is there any way to use Auth Flow without these steps or any inbuilt API which automatically takes care of these.

If not please suggest or guide us the best way to achieve this. As password flow is not allowed to be done from Java-script App.

authorizationjavascriptauthauth code flowwebphone
1597748683898.png (20.7 KiB)
1597748731915.png (25.8 KiB)
1597748780713.png (31.1 KiB)
1597748867618.png (20.7 KiB)
1 |1000 characters needed characters left characters exceeded

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

1 Answer

· Write an Answer
Embbnux Ji avatar image
Embbnux Ji answered ·

Hi Prakash, the only way to skip popup login is to use password grant flow or customize code flow.


For password, we don't have UI for password login now. You can run following js code inside Embeddable'f iframe to test:

 phone.auth.login({username: 'your_phone_number', extension: 'your_extension', password: 'password' })`

And Remember to set Embeddable to use your own app client id and secret. Your RingCentral app need to support password grant flow. You can check it in `developer.ringcentral.com`.

For auth code flow, you can also customize it by passing authorization code to it directly. https://github.com/ringcentral/ringcentral-embeddable/blob/master/docs/customize-authorization.md

BTW, for web app, password grant flow is not recommended. As we need to keep user's credentials safe. So it is not recommended to use it in iframe.

1 comment Share
1 |1000 characters needed characters left characters exceeded

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

Hi @Embbnux Ji,


As we are trying to incorporate this in our existing JavaScript App, you meant that without popup sign in is not allowed. Web page app are allowed only get authorized from Ring central server only correct me if I'm wrong.

One more question is, Can we do the Auth Flow steps using JAVA API and use the response data from the API call to complete rest of the flow(making a call) from Javascript Webapp.

Please help me to get out from this confusion or suggest me the best way to make the Webphone application(Javascript).

0 Likes 0 · ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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