News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
subscription to inbound faxes failing...
Tags: fax
Oct 26, 2021 at 3:11pm   •   2 replies  •  0 likes
Ajay Wadhawan

We are doing a login :

platform . login ( { username : process . env . RINGCENTRAL_USERNAME , password : process . env . RINGCENTRAL_PASSWORD , extension : process . env . RINGCENTRAL_EXTENSION , } ) ;

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)

on Oct 26, 2021 at 3:16pm   •  0 likes

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' } }

1 Answer
answered on Oct 26, 2021 at 7:23pm  

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/~/...

 0



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

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us