[SOLVED] How to increase the maximum page_size of request?

Its currently 200 I want to increase to 1000.
/api/v4/channels/{channel_id}/members?page=0&per_page=600
will give only 200 results. i.e. max allowed per_page is 200.

Thanks @bibekdari! What’s your use case to return 1000 results?

I want all channel members at once so that I can sort them on my own way.
actually by display name which I have created based on priority given to nickname > full name > username. like below. I want to sort users based on that display name so I need all users. I have 1000 users on my team that’s why I want to increase that page_size.
func displayName(user: User) -> String {
if user.nickname.exists {
return user.nickname
}

if user.fullName.exists {
return user.fullname
}

return user.username
}

Hi @bibekdari,

I would suggest making multiple requests until you get all the channel members you need

e.g. /api/v4/channels/{channel_id}/members?page=0&per_page=200, /api/v4/channels/{channel_id}/members?page=1&per_page=200, and so on until you receive less than 200 results, meaning you’ve hit the end.

Then once you have all the channel members you can sort them however you like

I’m also interested in this. In my case I’m trying to work around a bug with mmctl export:

At least I think it’s a bug :slight_smile: