Skip to main content

To check authentication status:

platform.isAuthorized()
.then(function(){ ... })
.catch(function(e){ ... });

The isAuthorized method will automatically perform a refresh of the access token, if needed. This method may be used in the login page of your application for automatic login.

There is also a synchronous method for checking the authentication status that does not automatically perform a refresh of the access token.

if (platform.isTokenValid()) {...}

Access token refresh normally happens automatically for common use cases. On rare occasions, you may perform a refresh of the access token manually by calling the refresh method, as follows:

platform.refresh().then(...)

Check the ringcentral example here:

https://github.com/ringcentral

All other info here all you need, have a look:

https://forums.developers.ringcentral.com/idea/291/using-oauth-20-authorization-code-flow-to-access-r.html


Reply