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
Mitigating the risk of Call Log API rate limits
Tags: rate limits
Oct 4, 2023 at 12:58pm   •   0 replies  •  0 likes
Byrne Reese

The RingCentral Call Log API is one of our most heavily used APIs as the need to access an account's call history is an incredibly common need and request. Given the nature of mining an account's call history, which may require an application to iterate over many pages of data as it downloads or processes data, apps can sometimes unintentionally cause their application to be rate limited. This article is intended to guide developers in ways to mitigate this risk when calling the Call Log API.

Downloading each user's call log

The first and most common scenario that tends to lead to apps being rate limited, especially for larger organizations, is when an app downloads each user's call log independently. In other words, the logic of the app says:

 users = load_users( account id )
 foreach user in users:
     page = 0
     while ( call_log = load_call_log( user, page++ ) ):
          process( call_log )

This design pattern tends to produce more API calls than is strictly necessary. As a result a more economical approach would be to download the entire company's call log, and process log entries for all users collectively.

Polling the Call Log API looking for new entries

Often developers poll the Call Log for new entries in an effort to keep their system synchronized with RingCentral. Generally speaking, if one can avoid it, it is advised to avoid polling, especially when there is a more real-time, push-driven altnernative available.

For the Call Log API, rather than polling, create a webhook subscription to which RingCentral will transmit an event whenever there is a change to an account or user's call history. In addition to minimizing API calls to avoid being rate limited, this approach also has the benefit of being real-time, ensuring your system of record is complete in sync with RingCentral.

The specific webhook event filter you would use in this circumstance would be the Account Telephony Sessions event.



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