我找不到足够的文档或工作示例。
从官方网站看来是可能的,我试过这个:
$Payload = { text:Hello; username:bot; channel:user}
Invoke-RestMethod -Uri https://mymattermost.com/hooks/%Bearer token% -Method Post
-ContentType 'application/json' -Body (ConvertTo-Json $Payload
但总是得到同样的错误:
Invoke-RestMethod : {"id":"web.incoming_webhook.text.app_error","message":"No text
specified","detailed_error":"","request_id":"aaaaaaaaaaaaaaa","status_code":400}
At line:1 char:1