SelectUpgrading WebOS V3 to V4

These docs are for version 3.16.5 of the WebOS SDK. To check out the docs for the latest version Click Here.

PubNub 4.0 for JavaScript is our latest and greatest! Please click here for our PubNub 4.0 for JavaScript docs and SDK.

PubNub 3.x for WebOS will encounter End Of Life (EOL) July 1st, 2017. All users currently on 3.x should begin migrating to 4.x. The 3.x SDK will continue to work. We will no longer support it and if you run into an issue, we will request that you upgrade to the latest version before solving the issue.

If you have questions about the PubNub for JavaScript SDK, please contact us at

  • V3 exposes PUBNUB
  • V4 exposes PubNub
 Always set the UUID to uniquely identify the user or device that connects to PubNub. This UUID should be persisted, and should remain unchanged for the lifetime of the user or the device. Not setting the UUID can significantly impact your billing if your account uses the Monthly Active Users (MAUs) based pricing model, and can also lead to unexpected behavior if you have Presence enabled.
  • V3 initiates via:
    var pubnub = PUBNUB.init({ /* params */ })
  • V4 initiates via:
    var pubnub = new PubNub({ /* params */ })
  • V3 contains callback as part of the first argument:
    	channel: 'hi', 
    	callback: function(){}, 
    	error: function(){}
  • V4 splits the convention with two params: arguments and callback
    		channel: 'hi'
    	function (status, response) {
    		console.log(status, response);
  • V3 uses snake_case for argument names.
  • V4 uses camelCase for argument names. Please refer to the documentation for the functions used for the new naming conventions.
  • V3 calls here_now when a subscribe connection is established.
  • V4 does not call hereNow, please call it manually as needed (from status on PNConnectedCategory or from presence on join for the current user).
  • V3 exposes the connect callback on subscribe.
  • V4 exposes the functionality via the listener on status portion of the listener, please listen to PNConnectedCategory on the status category.
  • V4 returns a status object for each transactional request in the callback and in the status portion of the listeners for non-transactional requests.
  • In V4 passing logVerbosity: true during initialization makes the SDK output logging information useful for debugging.