title: Sending JSON to Slack in a HTTP POST request
body: <p>I'm trying to send a message using <a href="https://api.slack.com/methods/chat.postMessage">Slack's chat.postMessage</a> API call. I have no problems encoding my test messages within HTTP GET, but I'm trying to achieve the same result with JSON in a HTTP POST request.</p>
  
  <p>I've been testing with both <code>curl</code> and <a href="https://www.getpostman.com/">Postman</a>, but Slack doesn't seem to be acknowledging my request body at all.</p>
  
  <pre><code>{
    "ok": false,
    "error": "not_authed"
  }
  </code></pre>
  
  <p>In <code>curl</code>, my request is encoded like this:</p>
  
  <pre><code>curl -H "Content-type: application/json" -X POST -d '{"token":"my-token-here","channel":"#channel-name-or-id","text":"Text here.","username":"otherusername"}'
  </code></pre>
  
  <p>In Postman, this is the raw body:</p>
  
  <pre><code>{
      "token":"my-token-here",
      "channel":"#channel-name-or-id",
      "text":"Text here.",
      "username":"otherusername"
  }
  </code></pre>
  
  <p>I haven't done anything like this before, so I'm not sure if I'm missing something out. Thanks!</p>