On this page

Muting users (deprecated)

Use Chat SDKs

This documentation is deprecated. Use any of our dedicated Chat SDKs to quickly implement chat functionality in your application.

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.

1pubnub.grantToken(
2 {
3 ttl: 15,
4 authorizedUserId: "user-1",
5 resources: {
6 spaces: {
7 "channel-a": {
8 read: true
9 },
10 "channel-b": {
11 read: true
12 }
13 }
14 }
15 }, function(status, token) {
show all 18 lines
Last updated on