grant

abstract fun grant(): Grant

Deprecated

This function is deprecated. Use the grantToken(ttl)

Replace with

grantToken(ttl)

This function establishes access permissions for PubNub Access Manager (PAM) by setting the read or write attribute to true. A grant with read or write set to false (or not included) will revoke any previous grants with read or write set to true.

Permissions can be applied to any one of three levels:

  • Application level privileges are based on subscribeKey applying to all associated channels.

  • Channel level privileges are based on a combination of subscribeKey and channel name.

  • User level privileges are based on the combination of subscribeKey, channel, and auth_key.