title: HTTP/1.1 401 Unauthorized Error on curl request - heroku
body: <p>i'm trying to send a request via curl to my heroku based api but i keep getting this error:</p>
  
  <pre><code>* Hostname was NOT found in DNS cache
  *   Trying 23.21.169.234...
  * Connected to helphy-api.herokuapp.com (23.21.169.234) port 80 (#0)
  &gt; POST /users/sign_in HTTP/1.1
  &gt; User-Agent: curl/7.35.0
  &gt; Host: helphy-api.herokuapp.com
  &gt; Accept: */*
  &gt; Authorization: Bearer d5bd07e4-a1c9-46d2-8d8e-d2a7cbc8501f, Accept: application/json
  &gt; Content-Length: 68
  &gt; Content-Type: application/x-www-form-urlencoded
  &gt; 
  * upload completely sent off: 68 out of 68 bytes
  &lt; HTTP/1.1 401 Unauthorized 
  &lt; Connection: keep-alive
  &lt; X-Frame-Options: SAMEORIGIN
  &lt; X-Xss-Protection: 1; mode=block
  &lt; X-Content-Type-Options: nosniff
  &lt; Content-Type: */*; charset=utf-8
  &lt; Cache-Control: no-cache
  &lt; X-Request-Id: 5b615fce-0674-4302-a9b9-f12cb00db754
  &lt; X-Runtime: 0.005328
  * Server WEBrick/1.3.1 (Ruby/2.0.0/2014-11-13) is not blacklisted
  &lt; Server: WEBrick/1.3.1 (Ruby/2.0.0/2014-11-13)
  &lt; Date: Fri, 16 Jan 2015 21:10:12 GMT
  &lt; Content-Length: 49
  &lt; Via: 1.1 vegur
  </code></pre>
  
  <p>This is my curl request:</p>
  
  <pre><code>curl -v -H "Authorization: Bearer $TUTORIAL_KEY, Accept: application/json" -X POST http://helphy-api.herokuapp.com/users/sign_in   -d '{"user": {"email": "xxxxxxx@gmail.com", "password": "xxxxxxx"}}'
  </code></pre>
  
  <p>UPDATE</p>
  
  <p>this is the log: </p>
  
  <pre><code>2015-01-16T21:43:04.342815+00:00 app[web.1]: Processing by SessionsController#create as */*
  2015-01-16T21:43:04.342822+00:00 app[web.1]:   Parameters: {"{\"user\": {\"email\": \"xxxxxx@gmail.com\", \"password\": \"xxxxxxx\"}}"=&gt;nil}
  2015-01-16T21:43:04.347678+00:00 app[web.1]: Completed 401 Unauthorized in 5ms
  updating...done. Updated to 3.23.2
  </code></pre>
  
  <p>Email and password are correct and chequed, btw.</p>