public ActionResult GetCode()
 {
     GetCodeModel gcm = new GetCodeModel();
     gcm.client_id = "KZMA1XOCwrhxF70VDMFTJ25gg1QPsJPHNunZL7vsoHHKQAT1Gj";
     gcm.redirect_uri = "http://54.84.112.141/Home/GetAuthToken";
     gcm.state = "12345678";
     return View(gcm);
     //return View();
 }
 public ActionResult GetAuthToken(string state="",string code="")
 {
     GetCodeModel gcm = new GetCodeModel();
         gcm.client_id = "KZMA1XOCwrhxF70VDMFTJ25gg1QPsJPHNunZL7vsoHHKQAT1Gj";
         gcm.client_secret = "<Client Secret Goes here>";
         gcm.redirect_uri = "http://54.84.112.141/Home/GetAuthToken";
         gcm.state = state;
         gcm.code = code;
         string requestParams = "client_id="+gcm.client_id+"&client_secret="+gcm.client_secret+"&code="+gcm.code+"&redirect_uri="+gcm.redirect_uri+"&state="+gcm.state;
         string requestUri = "http://join.agiliq.com/oauth/access_token/";
         Dictionary<string, string> response = GetAsync(requestUri, requestParams);
         gcm.access_token = response["access_token"];
         return View("Apply", gcm);
 }
 public ActionResult Apply(string access_token, string scope, string token_type)
 {
     GetCodeModel gcm = new GetCodeModel();
     gcm.access_token = access_token;
     return View(gcm);
 }