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
Query extension by phone number
Tags: rest api
Dec 24, 2021 at 5:33am   •   1 replies  •  0 likes
Jerry Magill

I have to write an app that sets a call forwarding destination for a user. In order to call the API I need an extension ID.

/restapi/v1.0/account/~/extension/'+extId+'/forwarding-number

However, all I have is the users DDI phone number to query with. So it would appear I have to first get a complete list of all phone numbers on the system and this will include their extension IDs.

/restapi/v1.0/account/~/phone-number

From there, I can use this list to lookup the extension ID for a specific phone number. I have over 25K users on the system. This takes time and puts load on the system. Is there no way to query just one phone number and get just it's details?

Thanks.

1 Answer
answered on Dec 27, 2021 at 8:47am  

You can call this API to search by phone number. However, the API rate limit group is heavy, which means you can call the API max 10 times per min. If you need to search more often, the best way is to read extensions' numbers once and keep them in your own database/array and implement your own search. Of course, you need to keep track of extension number changed to update your list. One way to do that is to listen to extension event notification and detect the changes.

Check out this filters

https://developers.ringcentral.com/api-reference/Extension-List-Event

https://developers.ringcentral.com/api-reference/Company-Directory-Event


 1
on Dec 27, 2021 at 9:27am   •  0 likes

Many thanks!



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