public static void Main()
var time = DateTime.UtcNow.ToString("yyyyMMddHHmmss");
var tokenexId = "6903729142826934";
var clientSecretKey = "uyd3BL7Xcypju9EM55JJiVm1ArpyF9BekQnfFrQw";
var origin = "https://beta-apollo-broker-portal-app-eastus.azurewebsites.net";
Console.WriteLine("Use the output below as the authentication key in JSFiddle.");
Console.WriteLine("Authentication Key:" +GenerateHMAC(tokenexId+"|"+origin+"|"+time+"|ANTOKENAUTO", clientSecretKey));
Console.WriteLine("timestamp:"+time);
private static string GenerateHMAC(string payload,string HMACKey)
var hmac = new System.Security.Cryptography.HMACSHA256{Key = System.Text.Encoding.UTF8.GetBytes(HMACKey)};
var hash = hmac.ComputeHash(System.Text.Encoding.UTF8.GetBytes(payload));
return Convert.ToBase64String(hash);