Hello,
My Rocket chat server is 0.73.2
I’d like to change the way that my linux servers send me notifications (today by mail).
Id’d like texte messages could be send to a special canal in rocket chat.
I now that could be done using API, but i’m really newbie around API stuff, i already read the documentation, but for me seems not enough to understand.
If possible i’d like to use simple request with curl and tokens: like that:
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
-H "Content-type:application/json" \
http://localhost:3000/api/v1/chat.postMessage \
-d '{ "channel": "#infra", "text": "This is a test!" }'
Result of this command give me
```a very long result starting with :
<!DOCTYPE html>
<html>
<head>
<meta name="referrer" content="origin-when-crossorigin">
<script>/* eslint-disable */
'use strict';
(function() {
var debounce = function debounce(func, wait, immediate) {
var timeout = void 0;
return function () {
var _this = this;
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var later = function later() {
timeout = null;
!immediate && func.apply(_this, args);
};