Get more data of user Linked in extension


I need to know if it is possible, apart from obtaining the userID, to obtain data such as userName, email, followers, etc. within the extension, since I need said data to be able to use resources from a private api.

would this be possible? And if possible, how could I do it?

I have read the documentation several times but I can’t find anything about it.

the token that I have managed to obtain only has a scope to obtain the userid, the scope of the extension could be changed to make this possible

Send the JWT to your EBS/Server then

For public data use an app access token against the API using the userID extracted from the JWT

If you need the viewers email address. Ask for it with a text field.
You don’t neccassrilly need to access/use their twitch registered email. And users would often prefer to give you (the extension) a different email to the one linked to their Twitch.

Then you don’t need to worry so much about oAuth schnanigans

Thanks for you reply!!

I need data of Twitch because my extensión using bits and if flow of my proccess fail i need his data for refund free ticket for use extensión service.

What endpoint of API i need to use for get public data?? Because i tryed using${auth.userId}` but token on extensión was not valid… :frowning:


Then you just need the userID

if you have helixtoken use that

Otherwise your EBS can use an App Access Token/Client Credentials token after decoding the userID from the JWT

as per this example Extension project:

Further reading on helixToken

I tryed to usted Helix token but this endpoint${auth.userId}`. Response me auth token IS not valid.

I think that the scope of this token dont allow for using in this scope but i dont know.

You have any referenceor example similar of my case?

I try to follow your links but if i can do It with Helix token please teach me how to!!

You use change the prefix to Extension as documented?

What does your call look like?

My other debug example here demostrates front end usage

You can concieveably pass the helixToken to an EBS for use.

*please note no helixToken in the rig or on mobile

1 Like

hello my friend!

I test your code and works well but i get many information about user but not email!

I used helix like you

        '' + channel_id,
            method: 'GET',
            headers: helix,

but i get public data and i need email, i saw that you can get app acces token how to get

        client_id: config.client_id,
        client_secret: config.client_secret,
        grant_type: 'client_credentials'

the flow is:

get user Id with helix , get app acces token with (i dont know if that show a login popo up) and with this result token i will try to get private data email?


As I said in my original reply

Otherwise you need to oAuth the user which basically means authenticating the user twice and might not pass review.

So just ask the user for their email in a text field instead. An Email is not public data.

It won’t as Client Creds is for Server to Server requests and doesn’t represent a user.