Bad Request when sending message to Extension PubSub

This may help:

let tokenPayload = {
    exp: Math.floor(new Date().getTime() / 1000) + 60,
    channel_id: ''+channel,
    role: 'external',

    pubsub_perms: {
        send: [
            'broadcast'
        ]
    }
}

The only thing I see different is that you perms dictionary has two keys and both with a *

try

    {"pubsub_perms",
        new Dictionary<string, object>()
        {
            { "send", new List<string>() { "broadcast" } 
        }
    },