Hi
I made a site for Instagram with instasharper (C# wrapper for instagram) .
But when I try to log in to my account. I can't.
Do you think Instagram doesn't let this C# wrapper, or there is a mistake in my code:
<div class="text-center">
<h5 >ConsoleMessage: @ConsoleMessage</h5>
<h5>ExceptionMessage: @ExceptionMessage</h5>
<h5>FileExitException: @FileExitException</h5>
<h5>FileExitConsole: @FileExitConsole</h5>
</div></div>
public static IInstaApi _instaApi;public static string username { get; set; }public static string password { get; set; }public bool result { get; set; } = true;public string message = "";public static string FileExitException=string.Empty;public static string ExceptionMessage=string.Empty;public static string ConsoleMessage = string.Empty;public static string FileExitConsole = string.Empty;private async Task StartInstagram(){var result = await MainAsync();if (result){NavigationManager.NavigateTo("ImageUpload");return;}}public static async Task<bool> MainAsync(){try{var userSession = new UserSessionData{UserName = Enterance.username,Password = Enterance.password};var delay = RequestDelay.FromSeconds(2, 2);// create new InstaApi instance using Builder_instaApi = InstaApiBuilder.CreateBuilder().SetUser(userSession).UseLogger(new DebugLogger(LogLevel.Exceptions)) // use logger for requests and debug messages.SetRequestDelay(delay).Build();const string stateFile = "state.bin";try{if (File.Exists(stateFile)){//Console.WriteLine("Loading state from file");FileExitConsole = "Loading state from file";using (var fs = File.OpenRead(stateFile)){_instaApi.LoadStateDataFromStream(fs);}}}catch (Exception e){//Console.WriteLine(e);FileExitException = $" error: {e}";}//return true;if (!_instaApi.IsUserAuthenticated){// loginConsoleMessage = $"Logging in as {userSession.UserName}";delay.Disable();var logInResult = await _instaApi.LoginAsync();delay.Enable();if (!logInResult.Succeeded){//Console.WriteLine($"Unable to login: {logInResult.Info.Message}");ConsoleMessage = $"Unable to login: {logInResult.Info.Message}";return false;}}}catch (Exception ex){ExceptionMessage = $"Can not work:{ex}";//ExceptionMessage = "again problem";}return false;}}