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)
param values look like this
Param: {
eventFilters: [
[ '/restapi/v1.0/account/+1XXXxxxXXXXX/extension/101/fax?direction=Inbound'
],
deliveryMode: {
transportType: 'WebHook',
address: 'https://xxxx.azurewebsites.net/api/receiveFax?clientId=xxxxx' } }
Where did you get this info from? It is totally incorrect!
[`/restapi/v1.0/account/${process.env.RINGCENTRAL_USERNAME}/extension/${process.env.RINGCENTRAL_EXTENSION}/...
Account id is not the user name and extension id is NOT extension number. Normally you don't need to specify the account id, use the tilde sign '~' instead. Same for the extension id. But for any reason you want to specify the account id and/or the extension id, read the account info or the extensions to find out the ids.
[`/restapi/v1.0/account/~/extension/~/...
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder