Skip to main content
Question

Web server app using sdk


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?

2 replies

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • 2314 replies
  • May 13, 2021

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


  • Author
  • New Participant
  • 1 reply
  • May 13, 2021

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings