I was trying the List collections endpoint under the Help Centre APIs using Pagination
Th Pagination Guide describes List APIs as using cursor based pagination, with the “next” parameter containing the “starting_after” parameter which can be used to fetch the next page of results
However, when I tried the List collections endpoint I got this as the result for the “pages” parameter. The “next” parameter gives a URL, not an object as described in the docs
"pages": {
"type": "pages",
"next": "https://api.intercom.io/help_center/collections?per_page=1&page=2",
"page": 1,
"per_page": 1,
"total_pages": 4
}
Here are the headers I used for reference:
{
“Authorization”: “Bearer <token>“,
“Accept”: “application/json”,
“Intercom-Version” : “2.13”
}
Since I’m passing the intercom-version I don’t expect this to be an error with the version.
Please explain the correct way to use Pagination
I see a related issue here. However I’m unsatisfied with the solution provided. In case the API is updated one day in keeping with the docs it would break our workflows.