PubNub Access Manager requires a timestamp parameter with an accuracy of +/- 60 seconds. The timestamp is a security feature that prevents certain types of replay attacks and it is passed in automatically by PubNub SDKs from your server to ours during the grant request.

SolutionEnable and configure NTP on your server to keep your system clock in sync and prevent it from drifting.

ntpdate command

For Linux/Unix systems, you can simply run the following command and it will give you your system clock drift.

    ntpdate -q

Compare system clock with PubNub Network time

Another option is to run this script will compare your system clock to the PubNub Network time (which is synced using NTP).

Manually "Eyeballing It"

If you can not do either of the above techniques, you can manually compare your system time using:

  • date (Unix/Linux)
  • time (Windows) 

to the time displayed at

Please use one of the above techniques and provide us with the results you get back. If you clock is more than 60s off from NTP or the PubNub Network time, then you need to sync your server system clock with NTP or equivalent. If you believe NTP or equivalent is already installed, then it may need to be reconfigured (check timezone settings).