Quantcast
Channel: Mattermost Discussion Forums - Latest posts
Viewing all articles
Browse latest Browse all 25778

Direct Message with REST API issue

$
0
0

Hi warmcool,

Direct message channels are treated the same as regular channels so they have to be explicitly created before you can send a message on them. That being said, I think it would make sense for webhooks to automatically create the direct channel if possible, so I've created an improvement ticket to add this feature.

In the meantime, you'll need to use the full web API to do this. We have Mattermost drivers that will make this easier if you're using Javascript or Go. Both of those provide a createDirectChannel method taking the unique ID (not the username) of the user you want to create a DM channel for. If you aren't using either of those, the API is directly available at /api/v3/TEAM_ID/channels/create_direct and it takes a JSON object of the form {"user_id":"USER_ID"}.


Viewing all articles
Browse latest Browse all 25778

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>