Bad Request when sending message to Extension PubSub

Yep Barry, I wasn’t creating any new views, now the channelId is being updated properly.

Last question, once I got this sorted out I think I shouldn’t have any other problem. If I want to listen for the messages I send to the PubSub from my EBS, I have to use the window.Twitch.ext.listen right? If so I’m doing something wrong because the callback for the listen function isn’t getting fired. Is this because I’m testing locally?

Here’s the simple code I’m using:

if (window.Twitch.ext) {

    window.Twitch.ext.listen("broadcast", function(target, contentType, message) {
        console.log('Recv');
    });
    
    window.Twitch.ext.onAuthorized(function(auth) {   
        _auth = auth.token;

        console.log(auth);

        $.ajax({ 
            url: "https://localhost:444/api/master/Start",
            type: "GET",
            crossDomain: true,
            data: {
                cn: auth.channelId,
                t: _auth
            },
            success: function (res) {
                console.log("done?: " + res);
            }
        });
    });
  
    window.Twitch.ext.onContext(function(context, contextFields) {
        console.log("onContext");
    });

    window.Twitch.ext.onError(function(err) {
        console.log("err: " + err);
    }); 
}

How I’m testing this? When the extension is loaded locally then I open my EBS code and send some messages to the PubSub. I was hoping that if I send a message to the PubSub then the front-end extension will get the message. Perhaps I’m wrong in my logic.