using HexaEightASKClientLibrary.HexaEight;
public static void Main()
var generic_resource_login_token = "6/yy0DXCxVfkxzbCvVfk24nlo/Msf4o4fDa8Y7lAkoIv251x8dmD2jCp55dDMcwg+ntnUbVWXAJAEsjTi0c9itUJjXgFfk0PTNO2LWeATF8RukymndYAyTBMC1UAY68AZ4oPluIse5UbkY4OCrcP82YI0GTYeNLwb9PAUSe5BPq8gSmD0vZh8YIuaW56KxilQi4kYOOyRjepVXD0YzNp5w4FAgIQ/KX7fndIq8/SjfV8liPCH5pO4hFHSTWLjwWiQ0eGp+ZFUjsekEAoWUOO8GEZApXMlg44PSPu3J1s/bo=.tc4jCpASNL2n1xbg6IuqtE5TRk+QB/5LVoPmMFW+icbVP+X8qZwmKr71aL2LwJ2XsnJZO1Ko1x99gfcCA8/XO7ym52Jt+Tv03KL113WkUxH/j6QF7C5OVXeZEMl4qrL8cx+nWksHUWKyQKfx9Nf8Tq7pB21OiLc2+XJUICULFJPrYycXf09x9xev+Wf/wvHUAy5anumj5vMQX1Ro3zOI2ZI2uSWV5ta0Ly3AN9PRuXSUQS4Fo6pRN6CqPGmjYqke1OtnAjfVrYHrfHwy9ANYJqfM/7LbWxkoYFx/hoPCap5WdFyO4MvCCbJshnJwpiKinz42P3HieV+TgBv0E5w4AQ==:TByfOTvv+46pYpo1y4FrUk46Jsk43olI4kAQrM0s1Q0iMHAuKhrvAC+rM3VQqCuXu0JH+cBFkC9XdNdwkUcCvcKc3SSxeRTRb3EE7G6NVmLIhLOs6hCubpFfTGluc7CpL6pMtLixjHVAlToJXrRUGk+LSSuSjIXIySPHxyo31TvWsQfU352RX+VGXskUHROdl1YF8sKV7i3sRgs2aU0cUVm51UJ7TBvo67mz+jTypZsoQvKWMu9af1nnQ9Sc21cU1OtnAjfVrYHrfHwy9ANYJqfM/7LbWxkoYFx/hoPCap5WdFyO4MvCCbJshnJwpiKinz42P3HieV+TgBv0E5w4AQ==";
var generic_resource_name = "A9CB8EFAF7D258CC03DCD71C37295B5FE7BE435DF13A43239D34EEDD4C21D464";
var generic_resource_login_token_password = "N26u;znMX8RLYG}geu(7gMmap7D_+jWB";
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 data1 = "Generic Instance 1 Data Set A (1) " + new Random().NextInt64();
string data2 = "Generic Instance 1 Data Set A (2) " + new Random().NextInt64();
using var client = new HttpClient();
var encrypteddata = myhost.EncryptMessageByKnownName("32F06EE16908D7D40732761920122DDC80068DF91C3542DD9C787D49C6F214E5",data1).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(data1 + " Posted To Common Sink With Response : " + dataresult.StatusCode);
encrypteddata = myhost.EncryptMessageByKnownName("32F06EE16908D7D40732761920122DDC80068DF91C3542DD9C787D49C6F214E5",data2).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(data2 + " Posted To Common Sink With Response : " + dataresult.StatusCode);