Twitter REST API hitherto did not include users email address by default when the /verify_credentials endpoint is requested, unless your application had been explicitly whitelisted after filling the special permissions part of this form.
Then navigate to the permission tab, check the
Request email addresses from users and save.
With the above ritual done; to get user’s email address, append a
include_email GET parameter with value “true” to the endpoint like so:
If you use HybridAuth PHP library like we do over at ProfilePress, adding
'includeEmail' => true to your twitter array configuration will automatically do the appending of
?include_email=true during API calls.
"Twitter" => array(
"enabled" => true,
"keys" => array(
"key" => $db_settings_data['twitter_consumer_key'],
"secret" => $db_settings_data['twitter_consumer_secret'],
'includeEmail' => true,