I’m a bit confused by the documentation, but if I understood correct, there is no way for an extension to get access to the user’s email address?
We are using the requestIdShare method, but with the non opaque user Id, we can’t access the user’s email.
Is there a way to do that with an extension, or only application can use the Twitch API ?
A users email address is private information, so you have to explicitly ask them to grant your app that permission (extensions are apps too).
You would need to send them through the OAuth process https://dev.twitch.tv/docs/authentication and request the user:read:email scope, which will give you an access token which you can use with the Get Users endpoint to retrieve their email address.
Instead I use a form input text field to ask the user their preference
As most users will ask you to use a different email address to the one attached to their Twitch Account. Or don’t want to grant elevated permissions.
It’s also a little nicer as a) you don’t have the second authentication loop and b) you can tell the user at point of data input how you intend to use the data (great for GDPR)
We are thinking of doing the same, but we were skeptical if this violates any of the TOS for Extensions.
But since you say you are doing this, then I guess it doesn’t violate them
I’m a bit confused as the documentation states you need to register your App in order to use the API.
We have created the extension, does that mean we also need to create an App to use the API ?