PubSub, ERR_BADAUTH please help me

error message:

ı create token for link
client id : true
scopes: channel_subscriptions

I’m entering the incoming token but I’m getting an error

type to nodejs

`const WebSocket = require(‘ws’)

const ws = new WebSocket(‘wss://’)

ws.on(‘open’, () => {


    type: 'LISTEN',

    nonce: 'asdasdasd',

    data: {

      topics: [''],

      auth_token: 'xxx'







Where am I doing wrong

clientID can’t be true it needs to be a real clientID

aside from that, you seem to have created a token correctly using this tool.

So you either tried to connect to a different userID’s subscriptions feed than is in the token
Or the token died.

‘clintid true’
The client id I entered was correct.
I recreated it and got the same error.

Then you are either misformatting the token

Or you are trying to read, say liriks subs when your key belongs to ninja for example

The token needs to have the userID you specified in

Then the token you have is not valid for userID 19571641

You should be able to use the token to call

The userID you specified belongs to Ninja, so Ninja will have needed to have authenticated, and I don’t think Ninja will have authenticated an implict auth key for you, I’m guess you have authenticated

And you don’t not have access to Ninja’s subs.

The UserID of the Token needs to match the userID in the topic

okey sir, the channel where I try to withdraw subscriber information must send me your token


And for that you don’t want to be using someones token generator.

As when the token dies they have to do it all over again.

You should build your own authentication flow to get both the user and refresh tokens.

So you can use the refresh token to get a new access token

Usually this flow

understood. I will create a post and create a new token every time it opens.

Something like this happens when I write my own ID. Is it because this channel is offline?


“error: no respons from Twitch” is not a valid Error from the basic websockets modules.

I don’t know what raised that error

okey sir, maybe because the subscription is not active, I will try it on a channel with subscription active.
Keep this place open for information I will return here.

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