How can I get a user's email address?

How can I get the email of a user, I understand that adding the scope user:read:email you can get in the GET response https://api.twitch.tv/helix/users

But even though I have the scope I am not able to get the user’s email, any suggestions?

ex
    {
      "id": "141981764",
      "login": "twitchdev",
      "display_name": "TwitchDev",
      "type": "",
      "broadcaster_type": "partner",
      "description": "Supporting third-party developers building Twitch integrations from chatbots to game integrations.",
      "profile_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/8a6381c7-d0c0-4576-b179-38bd5ce1d6af-profile_image-300x300.png",
      "offline_image_url": "https://static-cdn.jtvnw.net/jtv_user_pictures/3f13ab61-ec78-4fe6-8481-8682cb3b0ac2-channel_offline_image-1920x1080.png",
      "view_count": 5980557,
      "created_at": "2016-12-14T20:32:28Z"
    }

You can only get the email of the user that granted you that scope. So If you want to get the email of the user twitchdev, then you need twitchdev to go through your OAuth process and grant you that scope. It’s the same with any private information such as email, subscribers, etc… you can’t get private information about a user unless that user grants you permission to do so through the OAuth process.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.