Troubleshooting PubNub JavaScript SDK

How to enable logging

Set logVerbosity to true on initialization.

Required UserId

Always set the userId to uniquely identify the user or device that connects to PubNub. This userId should be persisted, and should remain unchanged for the lifetime of the user or the device. If you don't set the userId, you won't be able to connect to PubNub.

var pubnub = new PubNub({
subscribeKey: "mySubscribeKey",
publishKey: "myPublishKey",
logVerbosity: true,
userId: "myUniqueUserId"
Contact support

Copy the logs from the console output of the browser as text and submit to

Last updated on