Failed to get email address through account/verify_credentials

oauth

#1

Hello there,

I have been struggling for a while to try and get a user’s email address after getting an access token through the account/verify_credentials endpoint.

No matter what I do, the request’s response will not include the desired email field.
According to documentation, it should at least be there and contain null, but that is not the case.
Otherwise, the response looks fine and it also respects the other url parameters I pass in.

My full request looks like this:
https://api.twitter.com/1.1/account/verify_credentials.json?include_email=true&include_entities=false&skip_status=true
I already saw that putting include_email=1 creates problems, so I made sure the request uses true (the string) instead.

The app is also authorized to fetch a user’s email address as far as I can see, since it requests permissions to access the email address through the oauth dialog (see here: https://i.imgur.com/53MjjWc.png).

The oauth access token used is also a fresh one.

There must be something obvious that I am missing.
Any help is greatly appreciated.


#2

Bump, does anyone have any ideas?


#3

Does the user actually have an email that is verified? Some accounts only signed up with a phone number and don’t have emails.

Is email listed under the app on https://twitter.com/settings/applications for the user?

Have you tried duplicating your results with twurl? This can help point out if it’s a user issue or an issue with your code.


#4

Thank you for your reply,

after some digging I found out that my own dev tools betrayed me ;_;
They didn’t show me the full response and omitted the email field among others in debug mode for some reason.
But when actually used in code, things worked fine.


#5