I have some question regarding the rate limit for sending DMs using my app. Documentation says that I am limited to 15000/24hr (or 1000/24hr per user), but the details on calculating the count are a little foggy. I was going to try creating some tests, but then I noticed that the API call to get the rate limit status is limited to GET calls, and the one I’m interested in the POST direct_messages/events/new endpoint.

So hopefully the questions I have are easily answered…

First, how exactly is the count calculated. My application is mainly a “conversation” (for practical purposes, we can call it a chatbot) between end user and app. If the end user sends a DM to the app, the app can send 5 DMs to the end user (within 24 hours) before it counts. Also, I see that it says when the end user sends another DM, the threshold is reset. Does this mean:

  1. The entire total count is reset to 0
  2. The count for the end user is reset to 0
  3. Total count unchanged, the app is just allowed to send 5 more messages before they start “counting” again.

As an example…

5 end users send a DM to the app. The app response 6 times to each user. As the first 5 (per user) are free, each user has a count of 1 for a total count of 5. End user #1 sends a DM in response. Which is true (same numbers as above)?

  1. End user #1 has count reset to 0 (can receive 5 messages “free”) and total count is reset to 0
  2. End user #1 has count reset to 0 (can receive 5 messages “free”) and total count is reduced by 1 (the previous count for end user #1) for a new total count of 4
  3. End user #1 has count reset to 0 (can receive 5 messages “free”), total count is unchanged and remains 5 (until the 24 hour period is reached)

The second question I have is about what happens when I exceed rate limit. Does this disable the app’s ability to send ANY DM? Or only a DM that would increase the count?

Third and final question, is there a way to find the current count. I understand it’s a sliding window, or is that something I’d have to manage on the app side?

Sorry to be long winded, hopefully this is an easy one for someone more experienced here to answer.

Thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.