Using PubSub as a viewer in Twitch Extension

Hello, I created my overlay extension and as a test I would like to send a message to pubsub using:

window.Twitch.ext.send('broadcast', 'application/json', JSON.stringify({ option }));

However, I get the following error:

Error: sendToPubsub(signal) failed: Forbidden

The same code works when I use my own extension. Any ideas? The users are white listed in the extension.
The auth is correct and a token is send along with the request. However it just returns Forbidden.

It would seem that the only person allows to window.Twitch.ext.send with broadcast is in fact the streamer that the page is installed upon.

Not sure if a bug, or a piece of information missing from the documentation.

I checked the response from my “viewer trying to .send on the topic broadcast” the result response was “Permission denied to use target” Viewers cannot “broadcast”

Only the “broadcaster” can “broadcast”

After doing some tests. Seems that a viewer cannot use window.Twitch.ext.send at all. Only the broadcaster can.

1 Like