fetchMessages
Fetch historical messages from multiple channels. The includeMessageActions flag also allows you to fetch message actions along with the messages.
It's possible to control how messages are returned and in what order. For example, you can:
Search for messages starting on the newest end of the timeline.
Search for messages from the oldest end of the timeline.
Page through results by providing a
startORendtime token.Retrieve a slice of the time line by providing both a
startANDendtime token.Limit the number of messages to a specific quantity using the
limitparameter.Batch history returns up to 25 messages per channel, on a maximum of 500 channels. Use the start and end timestamps to page through the next batch of messages.
Start & End parameter usage clarity:
If you specify only the
startparameter (withoutend), you will receive messages that are older than and up to thatstarttimetoken.If you specify only the
endparameter (withoutstart), you will receive messages from thatendtimetoken and newer.Specify values for both
startandendparameters to retrieve messages between those timetokens (inclusive of theendvalue).Keep in mind that you will still receive a maximum of 25 messages even if there are more messages that meet the timetoken values.
Iterative calls to history adjusting the start timetoken is necessary to page through the full set of results if more than 25 messages meet the timetoken values.