[SOLVED] "Invalid Topic" returned from PubSub

Its me again :slight_smile:

I have set up my EBS locally and can send a message to the topic “broadcast” and get back a 204 response indicating success according to the documentation. However, when I try to use the twitchdev/pubsub-sample javascript front end I’m not able to connect to the “broadcast” topic.

{“type”:“RESPONSE”,“error”:“Invalid Topic”,“nonce”:“AAqwIWZCoSsziED”}

I couldn’t find any information on this specific error message.

I was able to verify that I can receive messages from the PubSub system on whispers, which indicates to me that the front end code is working.

Does anyone have information on how to resolve the “Invalid Topic” error message, or a full working example of publishing a message to a custom topic and receiving it on the front end? I’ve read through the documentation a number of times and couldn’t find anything helpful.

The pubsub sample is for consuming pubsub topics.

The extension broadcast topic is NOT a valid topic that you can listen on.

Extensions use:

window.Twitch.ext.listen('broadcast', function (topic, contentType, message) {

To listen instead.

1 Like

Oh okay. I had no idea it was that simple. It works only when run live, but it works.