Skip to main content

I have tried the SMS quickstart. I followed the Javascript example. But I get an error: Resource Not Available when trying to login in to ringcentral.

I am using my normal login account for the test app. It is in the sandbox. Below is the code.

const RC = require('@ringcentral/sdk').SDK
console.log("hello");
RECIPIENT = '716510xxx'
RINGCENTRAL_CLIENTID = 'qnxxxxx'
RINGCENTRAL_CLIENTSECRET = '3ec_nqkXQxxxx'
RINGCENTRAL_SERVER = 'https://platform.devtest.ringcentral.com/'
RINGCENTRAL_USERNAME = '+17168375727'
RINGCENTRAL_PASSWORD = 'xxxx'
RINGCENTRAL_EXTENSION = '102'
var rcsdk = new RC( {server: RINGCENTRAL_SERVER, clientId: RINGCENTRAL_CLIENTID, clientSecret: RINGCENTRAL_CLIENTSECRET} );
var platform = rcsdk.platform();
platform.login( {username: RINGCENTRAL_USERNAME, password: RINGCENTRAL_PASSWORD, extension: RINGCENTRAL_EXTENSION} )
platform.on(platform.events.loginSuccess, function(e){
  console.log("logged in");  
  read_extension_phone_number()
});

Error is gotten at Console.log("Logged in")

Below is the error I get:

capturerc.png

Is this the correct main company number (+17168375727) of your sandbox? I could not find any sandbox account with this number.


No, I was wrong and put in the main company number. Below is what i am using currently:

    "RINGCENTRAL_CLIENTID": "qncacxxx0WQ1jOxxxx",
    "RINGCENTRAL_CLIENTSECRET": "3ec_nqkxxxxx",
    "RINGCENTRAL_SERVER": "https://platform.devtest.ringcentral.com",
    "RINGCENTRAL_USERNAME": "+14242692261",
    "RINGCENTRAL_EXTENSION": "101",
    "RINGCENTRAL_PASSWORD": "<YOUR ACCOUNT PASSWORD>"



Reply