Muting users

Access Manager enables you to manage access for individual users so they can be muted on specific channels.

Mute user in channels

To mute user-1 in specific channels, call the grant token method and request only read permissions on these channels.

pubnub.grantToken(
{
ttl: 15,
authorizedUserId: "user-1",
resources: {
spaces: {
"channel-a": {
read: true
},
"channel-b": {
read: true
}
}
}
}, function(status, token) {
show all 18 lines
Last updated on