title: Twitter Authorization
body: <p>For 2 days I've tried to do a request with unirest (I have to use it) to Twitter but I'm not getting good feedback from rest of what I'm doing wrong.</p>
  
  <p>This is my request:</p>
  
  <pre><code>    HttpResponse request = Unirest.post( "https://api.twitter.com/1.1/account/settings.json" )
              .header( "Authorization",
                      "oauth_consumer_key=\"XXX\"," +
                              "oauth_token=\"XXX\"," +
                              "oauth_signature=\"XXX\"" +
                              "oauth_nonce=\"XXX\"," +
                              "oauth_signature_method=\"HMAC-SHA1\"," +
                              "oauth_timestamp=\"1467448738\"," +
                              "oauth_version=\"1.0\","
              )
              .header( "Content-Type", "application/json" )
              .header( "accept", "application/json" )
              .header( "X-Target-URI", "https://api.twitter.com" )
              .header( "Host", "api.twitter.com" )
              .header( "Connection", "Keep-Alive" ).asJson();
  </code></pre>
  
  <p>And I'm getting </p>
  
  <pre><code>{"errors":[{"code":215,"message":"Bad Authentication data."}]}
  </code></pre>
  
  <p>With this page it's easy to do https :// apigee.com/console/twitter but I see 
  oauth_timestamp, oauth_nonce, oauth_signature are random generated every time.  (Do I have to generate them somehow?)</p>
  
  <p>http :// quonos.nl/oauthTester/ - this site was helping me to check oauth signature</p>
  
  <p>And this https :// dev.twitter.com/oauth/tools/signature-generator/&lt;+my id> generated for me Signature base string, Authorization header, cURL command</p>
  
  <p>I have also keys from https :// apps.twitter.com/app/
      Consumer Key (API Key)
      Consumer Secret (API Secret)
      Access Token
      Access Token Secret
  (And Access Read, write, and direct messages)</p>
  
  <p>But every time I'm getting an error.</p>
  
  <p>So whats wrong with my code? Do I missing something?</p>
  
  <p>Thanks!</p>