// like Ivj6eZRx40MTx2ZvnG8nA public static string CreateToken() { Guid g = Guid.NewGuid(); var token = Convert.ToBase64String(g.ToByteArray()).Replace("=", "").Replace("+", "").Replace("/", ""); return token; } // like Onh0h95n7nw public static string CreateShortToken() { var rnd = new Random(); var tokenData = new byte[8]; rnd.NextBytes(tokenData); var token = Convert.ToBase64String(tokenData).Replace("=", "").Replace("+", "").Replace("/", ""); return token; }