[SOLVED] Can't Set Extension Required Configuration

You have the wrong type on your user_id needs to be a string not a numeric/integer.
Try this:

var secret = Buffer.from('sOmESecReT=', 'base64');

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

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

let signedJwt = jwt.sign(tokenPayload, secret);

base64decode the secret before use.
And cast the user_id and/or channel ID’s to strings not numerics. Note the explicit ''+channel_id in my example.

Above is a snippet from my pubsub sender as apposed to the oauth_receipt which I have not tested with.

1 Like