Skip to main content

I'm hoping to use the Embeddable widget for 95% of our new app's functionality, however there are a few things that I need which appear to only come from making REST calls.

What is the simplest way for me to use the embeddable widget (and the out of the box auth functionality) and then make an API request on behalf of the currently logged in user. Please note: for this app, it will be public, so users outside of the app's client id will be the ones logging in primarily. Everything I've tried so far keeps giving me a 401.

Hi @Nathan Douds Can you share which API you want to request out of the embeddable. For some commands, you can use embeddable's API directly https://github.com/ringcentral/ringcentral-embeddable/blob/master/docs/control-widget.md#control-widget

Any API request to RingCentral server require access token. Currently the embeddable saves access token in the iframe's local storage. You can only access that when you host the embeddable in the same domain. But it is not recommended to use token inside the embeddable, as the widget will refresh the token and expired old one.

If you want to request RingCentral API, It is better that you create another RingCentral RESTful app, and have another token management in the server side.


Reply