public static void Main()
string token = GetAuthToken();
Console.WriteLine(token);
public static string GetAuthToken()
string _auth = string.Format("\"{0}\":\"{1}\", \"{2}\":\"{3}\", \"{4}\":\"{5}\", \"{6}\":\"{7}\"", "Email","jpoualeu@eganco.com", "Password", "tools", "AccessKey", "F5431AE2-BC43-483A-AEF8-7F118169A85A", "LicenseType", "Admin");
_auth = "{" + _auth + "}";
Console.WriteLine(_auth);
HttpWebResponse response = null;
string url = "https://api.toolwatch.net/authentication";
(HttpWebRequest)WebRequest.Create(url);
request.ContentType = "application/json; charset=utf-8";
using (StreamWriter writer = new StreamWriter(request.GetRequestStream())){
response = (HttpWebResponse)request.GetResponse();
response = (HttpWebResponse)ex.Response;
using (StreamReader reader =
new StreamReader(response.GetResponseStream()))
token = reader.ReadToEnd();