RingCentral Account

Access Token
Access Token TTL
Refresh Token
Refresh Token TTL

Demo Instructions

  1. Ensure that you have Configured this demo app by entering the app key, app secret and OAuth 2.0 redirect URI.
  2. Click the "Link Account", "Unlink Account" and "Refresh" links to view what happens.

Developer Instructions

Link Account - Authorizaton

To access a user's RingCentral data, the app needs to request and receive OAuth 2.0 access token to access that data. In this demo, clicking the will allow the user to enter their username, extension and password which the app then uses to call the authorize() method as shown below to receive an access token / refresh token pair.

    username: username,
    extension: extension,
    password: password
}).then(function(response) {
    // run success code
}).catch(function(e) {
    //run exception code

Unlink Account - Logout

Using the SDK's logout functionality will end revoke the current token. The button will exercise the platform.logout() method to end the user's authorization grant.


Refresh Token - Refresh

During standard usage, token refresh will be handled automatically by the JavaScript SDK. By default, OAuth 2.0 values for expires_in and refresh_token_expires_in are set and the SDK will automatically perform a refresh with the access token has expired but the refresh token is still valid. To manually execute a refresh, you can use the following code.