Parameter Name Length Parameter description
ExpiredOn 10 Set the time, in EPOCH format, you wish for the hosted page session to expire at. Please note: the system timezone is GMT so your calculation should be in GMT. Optional

Calculating Epoch Expiration for Hosted Page Links

In our platform, secure links use epoch expiration timestamps in GMT (UTC) to control their validity. This guide explains how to calculate and use epoch expiration timestamps.

What is an Epoch Expiration Timestamp?

An epoch timestamp is the number of seconds since January 1, 1970, 00:00:00 GMT (UTC).

How to Calculate Epoch Expiration:
1. Determine the Expiration Duration

Decide how long the link should be active (e.g., 60 minutes).

2. Calculate the Expiration Time in GMT (UTC)
Code Example
DateTime nowUtc = DateTime.UtcNow;
DateTime expirationTime = nowUtc.AddMinutes(60);
long epochExpiration = (long)(expirationTime - new DateTime(1970, 1, 1)).TotalSeconds;
    
3. Example Calculation in JavaScript:
Code Example
var now = Math.floor(Date.now() / 1000); // Current time in seconds (GMT)
var expirationEpoch = now + (60 * 60); // 60 minutes in seconds
    
4. Manual Calculation (Online)

Use an online epoch converter tool, set the desired expiration in GMT, and get the epoch timestamp.

Important: The calculation should always be in GMT (UTC) to ensure consistency across systems.