We are doing a login :
following the succesful Login trying to subscribe for notification using the same account and extension.
var params = { //eventFilters: ['/restapi/v1.0/account/~/extension/~/message-store/instant?type=FAX'], eventFilters: [`/restapi/v1.0/account/${process.env.RINGCENTRAL_USERNAME}/extension/${process.env.RINGCENTRAL_EXTENSION}/fax?direction=Inbound`], deliveryMode: { transportType: "WebHook", address: process.env.DELIVERY_ADDRESS } } try { console.log("Param: ", params) var resp = await platform.post('/restapi/v1.0/subscription', params)
We are getting the error below:
Not allowed subscribe for events to extensions of other account
[2021-10-26T21:41:28.054Z] (node:30166) UnhandledPromiseRejectionWarning: Error: Not allowed subscribe for events to extensions of other account
at Client.<anonymous> (/Users/ajaywadhawan/dev/ch/coach-infrastructure/node_modules/@ringcentral/sdk/lib/http/Client.js:115:35)
[2021-10-26T21:41:28.054Z] at step (/Users/ajaywadhawan/dev/ch/coach-infrastructure/node_modules/@ringcentral/sdk/lib/http/Client.js:56:23)
[2021-10-26T21:41:28.055Z] at Object.next (/Users/ajaywadhawan/dev/ch/coach-infrastructure/node_modules/@ringcentral/sdk/lib/http/Client.js:37:53)
[2021-10-26T21:41:28.055Z] at fulfilled (/Users/ajaywadhawan/dev/ch/coach-infrastructure/node_modules/@ringcentral/sdk/lib/http/Client.js:28:58)
[2021-10-26T21:41:28.055Z] at processTicksAndRejections (internal/process/task_queues.js:93:5)