I’ve checked the two suggested articles related to “ERR_BADAUTH” and neither helped my problem–they are also from 2017 so perhaps out of date anyway. I’m using Node.js with the ‘ws’ and ‘request’ packages, for what it’s worth.
I am trying to listen to the custom channel points pubsub topic. I’ve successfully registered an application on the dev site and gotten a Client-ID and Client-Secret. I also have successfully connected to the pubsub-edge.twitch.tv site as well as received an oauth token from the id.twitch.tv site, using the Client-ID and Client-Secret from my registration as well as all of the scopes listed on the pubsub documentation. However, after all that is done, sending a LISTEN request through the pubsub connection still results in a RESPONSE with a ERR_BADAUTH error type.
I’m not including the “OAuth” in front of my token when sending it.
An example of outputs I get from running my program:
[open] Connection established.
Successfully authenticated (token, 4 scopes). Refreshing token in 5322s.
I can successfully connect to the pubsub server, perform PING/PONGs, get my OAuth, but I cannot for the life of me figure out why the LISTEN request always fails. I’m new to OAuth stuff so my apologies if the solution is trivial. I have spent several hours this weekend with various print statements and rereading the documentation and other forum posts and couldn’t figure it out.
Sorry the json output formatting is poor.