Search for messages using REST APIs

To search for specific messages, a user can call the following Message Search REST APIs:

Use the APIs above to search for two different message types: 

  • Messages sent to public chat rooms.
  • Messages sent to private chat rooms. For private chat rooms, the bot's service account must be added to the chat room first.

The Message Search REST API cannot obtain historical messages sent before the bot is added to the chat room. To obtain historical messages, you can use the Get Messages API instead.