The community forums are in BETA and closed to the public.

Gaining access to the PubNub TimeToken on Subscribe

Gaining access to the PubNub TimeToken on Subscribe

Sometimes you'll want access to the 17-digit PubNub TimeToken for reference purposes. Different PubNub SDKs like Java Android, Objective-C iOS and more will offer different options. Here is an example with JavaScript.

pubnub.subscribe({
    channel : "hello_world",
    message : function( message, envelope, channel ) {
        // **TIMETOKEN**
        console.log(envelope[1]);
    }
})

Comments to this discussion are now closed!