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?