title: Get user's email from Twitter API for External Login Authentication ASP.NET MVC C#
body: <p>I have checked a couple of related questions to find an answer to my question, but all to no avail. This question <a href="https://stackoverflow.com/questions/22627083/can-we-get-email-id-from-twitter-oauth-api">Can we get email ID from Twitter oauth API?</a> got me as far as getting the Twitter support to allow the permission on my app below:
  <a href="https://i.stack.imgur.com/Yo2kK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Yo2kK.png" alt="Additional permissions"></a>
  Using this <a href="https://dev.twitter.com/rest/reference/get/account/verify_credentials" rel="noreferrer">doc</a> as a guide and the marked answer's <a href="https://stackoverflow.com/questions/15049927/using-twitter-oauth-via-api-1-1-without-3rd-party-library">code</a> (modifying it a little bit)</p>
  
  <pre><code>var resource_url = "https://api.twitter.com/1.1/account/verify_credentials.json";
  var postBody = "include_email=true";//
  resource_url += "?" + postBody;
  </code></pre>
  
  <p>to generate a signature and make a request to get the user's details from twitter results in <strong>401 Unauthorized</strong> in my MVC app. </p>
  
  <p>However, when I use the twitter signature generator tool to generate the authorization header and use fiddler to make a GET request to <a href="https://api.twitter.com/1.1/account/verify_credentials.json?include_email=true" rel="noreferrer">https://api.twitter.com/1.1/account/verify_credentials.json?include_email=true</a>, I get the email only once and I have to regenerate my app keys in twitter to get it again. </p>
  
  <p>Is there a doc on how to generate a valid signature and make a valid request to retrieve the Twitter user email via .Net TwitterAuthentication?</p>