First time posting, but I just couldn’t find this answer anywhere else and wasted some time figuring it out.
I’m using the twitteroauth.php library to run all my authentication off the server. My apps are all whitelisted (I found that if I responded to the xAuth rejection letter from my request, reminding the support team that I don’t care about xAuth, I just want to be whitelisted, it was done in a matter of about an hour.)
But I couldn’t get the email address to come back in the status of the get request in ‘verify_credentials’.
Here is what finally worked, and there is nothing in the code that would prepare you to do this:
//With the token credentials we build a new TwitterOAuth object to validate the credentials found in the database
$connection = new TwitterOAuth(CONST_TWITTER_CONSUMER_KEY, CONST_TWITTER_CONSUMER_SECRET, $oAuthToken, $oAuthSecret);
$status = $connection->get('account/verify_credentials', array('screen_name'=>$oAuthScreenName, 'include_email'=>'true'));
The secret is in the single quotes (double would work as well) around the boolean for include_email. That’s it. Ridiculous, but now working. If you leave the boolean as a boolean and not a string, the email request will be ignored.