InstagramApiSharp icon indicating copy to clipboard operation
InstagramApiSharp copied to clipboard

Challenge IInstaApi always empty after login

Open str1py opened this issue 5 years ago • 1 comments

Important note

  • You must fill this form! If you don't fill it, your issue will be close immediately.
  • Put an X character between [ ] that is related to your issue, like [x]
  • Please remove Important note from this form!
  • Don't remove other sections (unless it's unnecessarily, like Debug logs and Screenshots sections)!

I've:

Issue category

  • [ ] Bug
  • [ ] Feature Request
  • [x] Missing Feature
  • [x] Question
  • [ ] Not sure

Language

  • [ ] C#
  • [ ] VB.NET

Usage

  • [ ] Windows Form/Console app
  • [ ] WPF app
  • [ ] Asp .NET MVC
  • [x] Asp .NET Core
  • [ ] Universal Windows Platform [UWP]
  • [ ] Xamarin or Xamarin Forms
  • [ ] Mono
  • [ ] Other

Operating System

  • [x] Windows
  • [ ] Windows Server
  • [ ] Linux
  • [ ] Mac OS
  • [ ] Other

Debug logs

If your issue has an debug log, post it here, unless remove this section!

Describe your issue

After send code while Challenge
public static IInstaApi _instaApi; is empty but user is logged in

                if (logInResult.Value == InstaLoginResult.ChallengeRequired)
                {
                    var challenge = await _instaApi.GetChallengeRequireVerifyMethodAsync();
                    if (challenge.Succeeded)
                    {
                        if (challenge.Value.StepData != null)
                        {
                            //var submitPhone = await _instaApi.SubmitPhoneNumberForChallengeRequireAsync("phone"); dont need
                            var phoneNumber = await _instaApi.RequestVerifyCodeToSMSForChallengeRequireAsync();
                            var a = phoneNumber.Value.UserId;
                            var verifyLogin = await _instaApi.VerifyCodeForChallengeRequireAsync("413975");

                            if (verifyLogin.Succeeded)
                            {                                     
                                if (_instaApi.UserProcessor == null) //null everytime
                                return true;
                            }

}

How get all data to _instaApi?

Screenshots

If you have screenshots, you can post it here. unless remove this section!

str1py avatar Jun 05 '20 12:06 str1py

You can Edit the Source code that output ChallengeInfo and TwoFactorInfo in StateData and Edit Import and Export Code about this.

saeed715 avatar Nov 03 '21 17:11 saeed715