internal string GetChallengeMessageString(string csrfToken) { var api = new ApiRequestChallengeMessage(_instaApi) { CsrtToken = csrfToken, LoginAttemptCount = "1" }; var json = JsonConvert.SerializeObject(api); return(json); }
internal string GenerateChallengeSignature(ApiVersion apiVersion, string signatureKey, string csrfToken, out string deviceid) { if (string.IsNullOrEmpty(signatureKey)) { signatureKey = apiVersion.SignatureKey; } var api = new ApiRequestChallengeMessage(_instaApi) { CsrtToken = csrfToken, LoginAttemptCount = "1" }; var res = CryptoHelper.CalculateHash(signatureKey, JsonConvert.SerializeObject(api)); deviceid = DeviceId; return(res); }