  We explore the fundamental origin of the quantum advantage behind random
access code. We propose new temporal inequalities compatible with
noninvasive-realist models and show that any non-zero quantum advantage of n
bits encoded to 1-bit random access code in the presence of shared randomness
is equivalent to the violation of the corresponding temporal inequality. As an
immediate consequence of this connection, we also prove that the maximal
success probability of n bits encoded to 1-bit random access code can be
obtained when the maximal violation of the corresponding inequality is
achieved. We then show that any non-zero quantum advantage of n bits encoded to
1-bit random access code, or in other words, any non-zero violation of the
corresponding temporal inequality can certify genuine randomness.
