Skip to main content

Hi,

I am using the intercom API list all contacts (endpoing /contacts)

The API call responds as expcted with two problems:

  • it ignores the per_page parameter. I tried 1, 5, 11 and other values.
  • It does not paginate, ignoring the starting_after parameter. In the screenshot below please notice that pages.next.starting_after that was returned is the same was as was sent.
  • I tried different API versions, including 2.11 and unstable

 

Postman Screenshot

 

Hey Ben 👋 Jacques here from support engineering.

If you're experiencing issues with pagination, it's possible that there may be a problem with the API or the way the request is being made. Ensure that each page is processed only once and that the requests are correctly formed according to the API's requirements. Also, if the starting_after parameter is the same as the one you sent, it could indicate that there's no further data to fetch or an issue with the API call itself.

When using the Intercom API to list all contacts and you encounter issues with the per_page and starting_after parameters not being respected, ensure that you're using the correct pagination approach. Intercom's API uses a cursor-based pagination system, which means you should use the starting_after attribute provided in the response for subsequent requests. Here's how you can structure your request:

  • Use the per_page parameter to specify the number of records you want per page.
  • Use the starting_after parameter with the value from the previous response to paginate to the next set of records.

For more detailed information on pagination in Intercom's API, you can refer to the pagination documentation.

If the issue persists for you, I would recommend opening a ticket with our support team so that we can dig deeper into the issue for you! :)

 

 


HI Jacques,

Doesn’t my screenshot prove the problem? 

Why are we talking in terms of theoretical issues?

 

Thanks,

 

Ben


Reply