Identify users and devices
Firstly, setting a User ID in the client configuration is required to establish a connection to PubNub. If you don't provide a valid User ID (UTF-8 encoded String up to 92 characters), you won't be able to use PubNub.
Secondly, User IDs are used to identify a client, which might be an end user, a device, or a server. A single user (a real living person) might have multiple devices (phone, tablet, laptop) so it's important to understand the relationship between them. Moreover, features that determine users' online presence rely on User IDs.
Finally, User IDs are essential to correctly calculate your bill according to the Monthly Active User (MAU) pricing model. MAUs are unique users (with unique user IDs) that connect to PubNub at least once in a calendar month and send an API call. If you'd rather pay for transactions, you may consider transaction-based pricing.
User ID / UUID
User ID is also referred to as UUID
/uuid
in some APIs and server responses but holds the value of the userId
parameter you set during initialization.
With your account created and SDK configured, it's time to start sending messages.