List conversations page size

#1

Hello,

I’m trying to build an app and need to list the conversations for a given admin. I would like to list all conversations, without pagination. I tought this would be possible based on the docs, that state that the page object is optional, but it returns a 20 conversations page.

I also tried to increase the page size, and found out that API limits the per_page value to 60, but it only returns 25 conversations (it still calculates the number of pages based on the per_page value).

Should it be possible to list all conversations without pagination? Should 25 be the per_page limit?

I’m using the enpoints like:
/conversations?type=admin&admin_id=1234&per_page=60
/conversations?type=admin&admin_id=1234

Thank you in advance.

0 Likes

#2

Hey @iudelsmann :wave: We paginate automatically here, with a maximum of 60 conversation objects per page in the request. You should be able to specify per_page in the params of the request like so to increase that limit up to 60:

https://api.intercom.io/conversations?type=admin&id=<INSERT_ID_HERE>&per_page=60

Is this working for you? :ok_hand: You should see the pages object with the page_per attribute stating 60, and the full 60 conversation objects.

0 Likes

#3

Hello Zach,

Thanks for the quick reply. I tried 60 conversations per page, but it returned only 25. The pages object is correct, but the list of conversations does not match. You can see an image of the parsed json below displaying the conversations array count

0 Likes

#4

Yeah - looking further it seems it’s a an issue stemming from specifying a type parameter. if you don’t, it should work, and you can then iterate upon the admin_id of the conversations yourself.

It’s not ideal at all, and it’s still definitely a bug all the same - mind writing in through the Messenger so we can keep track and keep you updated? :+1:

0 Likes