TLS communication for PubNub clients is enabled by default. If you need to disable it for any reason, it can be done during the PubNub object initialization. Each SDK has its own API, so refer to our SDK docs for the one that you are using.
A sample code:
var pubnub = new PubNub({ subscribeKey: "mySubscribeKey", publishKey: "myPublishKey",
userID: "ClientUserID" ssl: false // default true })
For more information please check: PubNub Connection Security Protocol Support.