The chat API will read only the latest 1000 messages per each API call. For a one-on-one chat, one reaches the next page this by setting a value for "next" and running a second query.
Following the instructions at keybase chat api -h, I read the first page of messages in a one-on-one chat.
This returns the second page of chat results and may be iterated until one reaches the last message. It seems to me that this same process should work for the messages in a channel in a team: however, this is not the case.
If I follow the help docs and read messages in a channel in a team as follows...
... I do in fact get 1000 messages followed by a pagination block as above. However, when I take next_value from the JSON results as before and pass a second query...
... it appears that the API does not process the request. Instead, the first page of results is returned a second time.
If you attempt to incorporate the pagination function into a script or bot that has to read beyond the first page of message results, everything breaks. Maybe I am doing something wrong but everything in the available documentation suggests that pagination should work for channels in teams as it does for one-on-one chats.
The chat API will read only the latest 1000 messages per each API call. For a one-on-one chat, one reaches the next page this by setting a value for "next" and running a second query.
Following the instructions at
keybase chat api -h
, I read the first page of messages in a one-on-one chat.Some JSON ensues, ending in a pagination block.
One then takes next_value from the JSON result and runs a second query.
This returns the second page of chat results and may be iterated until one reaches the last message. It seems to me that this same process should work for the messages in a channel in a team: however, this is not the case.
If I follow the help docs and read messages in a channel in a team as follows...
... I do in fact get 1000 messages followed by a pagination block as above. However, when I take next_value from the JSON results as before and pass a second query...
... it appears that the API does not process the request. Instead, the first page of results is returned a second time.
If you attempt to incorporate the pagination function into a script or bot that has to read beyond the first page of message results, everything breaks. Maybe I am doing something wrong but everything in the available documentation suggests that pagination should work for channels in teams as it does for one-on-one chats.