DM reply within webhook




I would like to know the best practice to reply to a DM caught within the POST in the webhook code.

  1. use of DM API (
  2. directly return JSON from the POST (as long as it is possible)
  3. other…



I’m not really sure what you mean by #2. I think you should use the DM API endpoint that you linked to in #1 but it’s probably not ideal to do that at the time of the postback being called. Your script that handles the postback/event/hook should be as simple as possible to execute quickly and avoid failure. I typically just queue events from there.


Can you tell me how you linked webhook to the app?