How Can i get my direct messages in slack api ? i have try these methods search.messages etc and this link https://slack.com/api/search.messages but can not show result.
Asked
Active
Viewed 1,650 times
1 Answers
2
To get all your private messages:
Get the list of direct message channels you are a member of with conversations.list by setting the
types
property toim
Do a loop over the list of all channel and query each with conversations.history to get all messages.
Make sure to use an access token authorized by yourself to see all private channels.

Erik Kalkoken
- 30,467
- 8
- 79
- 114
-
I want to get messages not from channel but from direct messages – UMDEVELOPER Jul 27 '18 at 12:00
-
your question says "private messages". please update it to "direct messages" and I will update my answer accordingly – Erik Kalkoken Jul 27 '18 at 12:16
-
@UMDEVELOPER If this answer solved your problem, please mark it as solution. TY – Erik Kalkoken Jul 31 '18 at 12:51