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

Incoming Webhook cannot send to user

$
0
0

Summary

In the payload of an incoming webhook, specifying a user results in error 500 "Couldn't find the channel"

Steps to reproduce

  1. Create incoming webhook
  2. Open Firefox (or web browser with capability to POST and pass parameters)
  3. Use the URL of the webhook and post the suggested example in the documentation (Make sure to put application/json in the content type of the header):
    {"text": "Hello, this is some text."}
  4. Message should appear in the channel
  5. Try again, but now add the channel property
    {"channel":"@username","text": "Hello, this is some text."}
  6. Enter a valid user name in @username (leave the @ sign).
  7. Post will now fail with a 500 error and message "Couldn't find the channel"
  8. Changing channel property to a public channel works. Only with @username is not working.

Expected behavior

As per documentation, "the message will be sent to that user’s direct message channel"

Observed behavior

Returned JSON:
{"id":"web.incoming_webhook.channel.app_error","message":"Couldn't find the channel","detailed_error":"","request_id":"8aajaxpkybn8mmm7t4nkefnrca","status_code":500}

Also, misspelling the username or putting an invalid username results in "Couldn't find the user". So maybe the problem is that there's no "channel" message for the user (as in Slack, the user can have private messages with themselves)


Viewing all articles
Browse latest Browse all 25778

Trending Articles



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