Install dependent libraries with
./public/config.js file to configure your client ID, client secret and redirect URL, etc.
$ cd ./public $ cp config-sample.js config.js $ vi config.js
Please visit Developer Portal to apply client ID and secret. And ensure the redirect URI in your config file has been entered in your app configuration. By default, the URL is set to the following for this demo:
Include the config file, RingCentral SDK and related libraries into HTML file.
Create RingCentral SDK instance.
Get login URL from RingCentral SDK instance.
Open a new window with the login URL.
When login finished, plaform will redirect to the callback URL(the configured redirect URL). The callback URL contains the auth code which we need to login into RingCentral platform.
Now that we get the auth code, we can call the
login API of the SDK instance to log into RingCentral platform.