grantToken
This function generates a grant token for PubNub Access Manager (PAM).
Permissions can be applied to any of the three type of resources:
channels
channel groups
uuid - metadata associated with particular UUID
Each type of resource have different set of permissions. To know what's possible for each of them check ChannelGrant, ChannelGroupGrant and UUIDGrant.
Parameters
Time in minutes for which granted permissions are valid.
Additional metadata
Single uuid which is authorized to use the token to make API requests to PubNub
List of all channel grants
List of all channel group grants
List of all uuid grants
Deprecated
This function is deprecated. Use the new grantToken(ttl, userId, meta, authorizedUUID, channels, channelGroups, uuids)
Replace with
grantToken(ttl, meta, authorizedUUID, channels, channelGroups, uuids)This function generates a grant token for PubNub Access Manager (PAM).
Permissions can be applied to any of the two type of resources:
spacePermissions
userPermissions
Each type of resource have different set of permissions. To know what's possible for each of them check SpacePermissions and UserPermissions.
Parameters
Time in minutes for which granted permissions are valid.
Additional metadata
Single userId which is authorized to use the token to make API requests to PubNub
List of all space grants
List of all userId grants