1

i am trying to use the API to get the total number of messages posted by each user during a certain period. Ideally, I would be able to break the number of messages by the type of channel (public, private, direct messages.) Is this possible? I am looking through the API documentation but haven't found anything. I would be using it to create a script that would automatically generate weekly activity reports.

Thank you for any advice you can provide!

Irina
  • 1,333
  • 3
  • 17
  • 37

1 Answers1

3

There is no special endpoint for this information as far as I know, but you can generate something similar yourself by looping though all channels and counting the message per user, e.g.

  1. Get list of all channels with conversations.list
  2. Get history of each channel with conversations.history
  3. Count messages per user

Of course your results would not include message from channels, that your bot has no access too (e.g. some private channels, direct message channels).

Erik Kalkoken
  • 30,467
  • 8
  • 79
  • 114