using HexaEightASKClientLibrary.HexaEight;
public static void Main()
var generic_resource_login_token = "E0gVVUQqJjh7AGDmd17fRdv2ns5Ch6cGkjm/bcD1wxA8vPHeX0STd2PO9VOqQwA2ELrJTQXNyG7sGx3iY3/SmatwunwVk9KE6hXXrmxaFb122fj2KxWSxK4VGezHKJRMK7S6cNa/YPQF1k61Trq+bE8EdVTKBgx2yFGpQgLNc/ytRB2Lqi9RmUQw1T2tvX8MaR4WYjmv//WLR55e8aJX3LB3zV5yVojySch3ciMUsr65yDE4NSGe7nVkAwtHdwa97tDaCKAF39jgqizPr83/roBCcNqGU2nlG13VeTxTYX8=.YZtZpkDjCjvUg3VluS0ZqRW+VkEpI0lNVebBQETAw0JTJ4Nrr+X2oSB9gXlLRau6Fss1/niGJaqSVfxBOD+dNDfsCmMbBd4nXq4avdb3yBJLzFhmcANLnP5hIbUwc+UsLs8qlWWaXrSgTDMgdD2SnJWTQxyEZgJbD7Ibp3DPLhZMNdEG0/I0kKjSQ0ab+qNIk0CKOLrRH7xfTBoaeyY27+9NyU4TOXYwpDP4a6TRmjzuHMKn9zcHTjLMy6DANygTKyV00ZYsfDKZFJtKoxlRT675NRBOjVtb/2+aXpEEpnI5hmrDTMx7WO+6NOtpvVd7mFCt2r/AwUoKzJtrEl3hAQ==:z7HfInyCgyBfRRFO7XnueQ62JEfQeX2fAGVzDWf7Kf19ybATB332NdiW7xdzf63C3ig6dnrQ+XOzKJ8XnIYQAVllMJbGqj1RuW9pF+LZmrGQlBuwtu5Cuzh2Nyb+3Yyo2TqZIsPVKw6v4W+VJUiHmxBMHSSS8xdBup9hFfw2J0qi+h2Mv2rvLNm7UOCE73cbT45/alkWpRl+Ovpd/JzsysV8cCQp0FgmPOyOxOqGO4WGoHca31h2YAo3mkO6JVYIKyV00ZYsfDKZFJtKoxlRT675NRBOjVtb/2+aXpEEpnI5hmrDTMx7WO+6NOtpvVd7mFCt2r/AwUoKzJtrEl3hAQ==";
var generic_resource_name = "A9CB8EFAF7D258CC03DCD71C37295B5FE7BE435DF13A43239D34EEDD4C21D464";
var generic_resource_login_token_password = "FPK,WQR%MCThC93LCE}ttjS^-yE])w9";
var myhost = new ASKClient(generic_resource_login_token, generic_resource_name, generic_resource_login_token_password);
myhost.SetRapidAPIKey("Put Your API Key Here");
var resource_masked_identifier = generic_resource_login_token.Split(".")[0];
Int64 kgt = Convert.ToInt64((DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0)).TotalMinutes);
string data4 = "Generic Instance 1 Data Set C (4) " + new Random().NextInt64();
string data5 = "Generic Instance 1 Data Set C (5) " + new Random().NextInt64();
using var client = new HttpClient();
var encrypteddata = myhost.EncryptMessageByKnownName("32F06EE16908D7D40732761920122DDC80068DF91C3542DD9C787D49C6F214E5",data4).GetAwaiter().GetResult();
var senddatasink_url = "https://dweet.io/dweet/for/32F06EE16908D7D40732761920122DDC80068DF91C3542DD9C787D49C6F214E5?data=" + System.Web.HttpUtility.UrlEncode(kgt.ToString() + "|" + resource_masked_identifier + "." + encrypteddata);
var dataresult = client.GetAsync(senddatasink_url).GetAwaiter().GetResult();
Console.WriteLine(data4 + " Posted To Common Sink With Response : " + dataresult.StatusCode);
encrypteddata = myhost.EncryptMessageByKnownName("32F06EE16908D7D40732761920122DDC80068DF91C3542DD9C787D49C6F214E5",data5).GetAwaiter().GetResult();
senddatasink_url = "https://dweet.io/dweet/for/32F06EE16908D7D40732761920122DDC80068DF91C3542DD9C787D49C6F214E5?data=" + System.Web.HttpUtility.UrlEncode(kgt.ToString() + "|" + resource_masked_identifier + "." + encrypteddata);
dataresult = client.GetAsync(senddatasink_url).GetAwaiter().GetResult();
Console.WriteLine(data5 + " Posted To Common Sink With Response : " + dataresult.StatusCode);