title: how to use github api token in python for requesting
body: <p>I'm able to obtain Github api token in python using username and password but i'm not able to use that API-Token for requesting any POST/DELETE/PATCH.</p>
  
  <p>How do we use Github API-Tokens for making any request.
  For eg, i have API-Token lets say 'hbnajkjanjknjknh23b2jk2kj2jnkl2...'</p>
  
  <p>now for requesting</p>
  
  <pre><code>#i'm providing username and API-Token in headers like    
  self.header = {'X-Github-Username': self.username,
                 'X-Github-API-Token': self.api_token                  
                }
  #then requesting(post) to create a gist
  r = requests.post(url, headers=headers)
  </code></pre>
  
  <p>But i'm always getting <code>401 error</code> with <code>Bad Crediantials</code> message.</p>
  
  <p>What's the proper way to use API-Tokens without inputting the password</p>