コード例 #1
0
        internal string GetChallengeMessageString(string csrfToken)
        {
            var api = new ApiRequestChallengeMessage(_instaApi)
            {
                CsrtToken         = csrfToken,
                LoginAttemptCount = "1"
            };
            var json = JsonConvert.SerializeObject(api);

            return(json);
        }
コード例 #2
0
        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);
        }