Skip to main content

I am trying to use the ring central javascript sdk. My created up is for our users only, it is a web server app. I am not clear on how needs to be used to log in and run an endpoint.

I am running this but I keep getting unauthorized for this grant type.


let rcsdk = new RC( {server: RINGCENTRAL_SERVER, clientId: RINGCENTRAL_CLIENTID, clientSecret: RINGCENTRAL_CLIENTSECRET} );
rcsdk
.login({
username: 'myusername', // phone number in full format
extension: '', // leave blank if direct number is used
password: 'mypassword'
})
.then(function(response) {
console.log(response)
})
.catch(function(e) {
console.log(e.message)
});

any idea?

Login that way is the "Password Flow" authentication so your app's Platform type needs to be "Server only- No UI" type.


@Phong Vu so if my app is web server, what all do I need?


Reply