/// <summary> /// Start new session by retrieving new Secret Key and AuthToken from Monitis API. /// </summary> public ActionResult Start() { ActionResult actionResult = new ActionResult(); UserAPI userAPI = new UserAPI(APIKey, APIType); _secretKey = userAPI.GetSecretKey(); if (String.IsNullOrEmpty(_secretKey)) { actionResult.AddError("Can't get secretkey"); } else { CurrentAuthToken = userAPI.GetAuthToken(_secretKey); if (String.IsNullOrEmpty(CurrentAuthToken)) { actionResult.AddError("Can't get authToken"); } else { actionResult.IsSuccessful = true; } } return(actionResult); }