Skip to main content

var subscription = rcsdk.getSubscription();

subscription.on(subscription.events.notification, function(msg) {


console.log(msg.body.activeCalls[n].from);


// activeCalls is array

console.log(msg.body.activeCalls[n].to);

})

.register({


events: ['/account/~/extension/~/presence?detailedTelephonyState=true'],

})

.then(function(response) {


console.log('Success: Subscription is listening');

}).catch(function(e) {


alert('Subscription Error: ' + e.message);

});



Using This code for that



Without seeing the complete code for this and how you've configured your Sandbox account I am unable to help isolate this problem any further on your specific issues.

So I created this sample application in Node.js which shows how to use the basics of the RingCentral Push Notifications.

https://github.com/bdeanindy/ringcentral-subscription-basics

Let me know if this helps (if you encounter issues with this code, please add issues in the Github issue tracker for this repository).
how i do this in javascript.

on loading page this exception occurs
Network Error when attempting to fetch resource.Server cannot authorize user


Reply