Enabling TLS (formerly SSL) communication for PubNub clients over HTTPS is as easy as setting a configuration parameter to true. 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", ssl: true })