Get profil picture of viewers looking my stream

I new on twitch, I would like stream a animation as I did on tiktok,
but my english is bad and I not understand the doc :blush:
For my stream, I need:

  1. detect when viewers send message (it ok, easy to do with tmi.js) and detect when they send bits (is it detectable with tmi.js ?)

  2. found the profil picture of the viewer that was detected, to display it

How can I do ?

For now, I try to get picture of user name sardoche (for try) but it not work , return bad request, invalid)

  url: '',
  method: 'get',
  headers: {
    'Client-Id': '8395wu945kt4444go8egina9mijgpr',
    'Authorization': 'Bearer REMOVED'

the client id is from my console app,
the bearer is token that I generated with :'', {
    client_id: '8395wu945kt4444go8egina9mijgpr',
    client_secret: 'REMOVED',
    grant_type: 'client_credentials'

That not the good way it is ?
thank for help :slight_smile:

sardoche is not an β€œid” it’s a login

So as per Reference | Twitch Developers

You want

If you read the error message not just the code you’ll get information about your error.

You should also rotate your client secret as you just leaked it to the world.

1 Like

Thank you BarryCarlyon
It work now

  url: '',
  method: 'get',
  headers: {
    'Client-Id': '<secret>',
    'Authorization': 'Bearer <secret>'
}).then(function (data) {

get result:

Do you have suggestion to detect when viewers send bits ?

if there is a IRCv3 tag present in the message of bits

1 Like

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