Search code examples
oauth-2.0symfony-2.3yahoo-apihwioauthbundle

yahoo oauth authentication email scope


I want to implement integration between yahoo and my application (via HWIOAuthBundle) every thing goes well, but in yahoo response i found no email address!! and for my user registration i do need email address.

could anyone help me and say which scope gives you the user email address? i read https://developer.yahoo.com/social/rest_api_guide/extended-profile-resource.html and found no answer.

i can choose between these:

  • Contacts
  • Fantasy Sports
  • Yahoo Gemini Advertising
  • Messenger
  • Profiles (Social Directory)
  • Relationships (Social Directory)

Thanks.

============================

sample response:

{ ["paths":protected]=> array(7) { ["identifier"]=> string(12) "profile.guid" ["nickname"]=> string(16) "profile.nickname" ["firstname"]=> NULL ["lastname"]=> NULL ["realname"]=> string(17) "profile.givenName" ["email"]=> NULL ["profilepicture"]=> NULL }

["response":protected]=> array(1) { ["profile"]=> array(22) { ["guid"]=> string(26) "..." ["ageCategory"]=> string(1) "A" ["created"]=> string(20) "2016-06-06T13:33:40Z" ["image"]=> array(4) { ["height"]=> int(192) ["imageUrl"]=> string(56) "https://s.yimg.com/dh/ap/social/profile/profile_b192.png" ["size"]=> string(7) "192x192" ["width"]=> int(192) } ["intl"]=> string(2) "us" ["jurisdiction"]=> string(2) "us" ["lang"]=> string(5) "en-US" ["memberSince"]=> string(20) "2016-06-06T09:41:48Z" ["migrationSource"]=> int(1) ["nickname"]=> string(6) "Raasco" ["notStored"]=> bool(true) ["nux"]=> string(1) "3" ["profileMode"]=> string(6) "PUBLIC" ["profileStatus"]=> string(6) "ACTIVE" ["profileUrl"]=> string(51) "http://profile.yahoo.com/..." ["updated"]=> string(20) "2016-06-06T13:33:40Z" ["isConnected"]=> bool(false) ["profileHidden"]=> bool(false) ["bdRestricted"]=> bool(true) ["profilePermission"]=> string(7) "PRIVATE" ["uri"]=> string(71) "https://social.yahooapis.com/v1/user/.../profile" ["cache"]=> bool(true) } }


Solution

  • the answer is Contacts and Profiles(soacil directory) API permission required to fetch user email address.

    take attention that yahoo will give you all user's emails, with lables. then you can fetch the primary one.