using System.Collections.Generic;
public static void Main()
TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1));
int timestamp = (int)t.TotalSeconds;
var payload = new Dictionary<string, object>() {
{ "jti", System.Guid.NewGuid().ToString() },
{ "email", "gbzen01@internalgvc.com" },
const string secret = "xGY0xEmrQm6QMdf5qSlgrj40BfIYWWRSToWQIJhZiiqzjqI7";
IJwtAlgorithm algorithm = new HMACSHA256Algorithm();
IJsonSerializer serializer = new JsonNetSerializer();
IBase64UrlEncoder urlEncoder = new JWT.JwtBase64UrlEncoder();
IJwtEncoder encoder = new JWT.JwtEncoder(algorithm, serializer, urlEncoder);
var token = encoder.Encode(payload, secret);
string redirectUrl = "https://" + "entainsandbox" + ".zendesk.com/access/jwt?jwt=" + token;
string returnTo = "https://z3nsandbox426galabingocom-sandbox.zendesk.com/hc/en-us/requests";
redirectUrl += "&return_to=" + "https%3a%2f%2fz3nsandbox426galabingocom-sandbox.zendesk.com%2fhc%2fen-us%2frequests";
Console.WriteLine(redirectUrl);