title: slack api calls through python request library
body: <p>I was making slack api calls through python library slackclient which is a wrapper around slack api. However, for some cases I need to make conventional api calls also with url and get/post method. I was trying to open a direct message channel with another user by my bot. The documentation - <a href="https://api.slack.com/methods/im.open" rel="nofollow noreferrer">https://api.slack.com/methods/im.open</a> says to  "Present these parameters as part of an application/x-www-form-urlencoded querystring or POST body. application/json is not currently accepted."</p>
  
  <p>Now in python, I can write,</p>
  
  <pre><code>url = 'https://slack.com/api/im.open'
      headers = {'content-type':'x-www-form-urlencoded'}
      data = {'token':BOT_TOKEN, 'user':user_id, 'include_locale':'true','return_im':'true'}
      r= requests.post(url,headers,data )
      print r.text 
  </code></pre>
  
  <p>The message I get is <code>{"ok":false,"error":"not_authed"}</code></p>
  
  <p>I know the message is "not authed" although I use my bot token and another user id, my hunch is that I'm sending the request in wrong format because I just wrote it some way reading the documentation. I'm not sure how to exactly send these requests. </p>
  
  <p>Any help?</p>