Home c# C # vknet Authorization

C # vknet Authorization

Author

Date

Category

After completing this code, the button sticks and nothing happens.

vkapi vkapi = new vkapi ();
  Private Void Button1_Click (Object Sender, Eventargs E)
  {
    VKAPI.Authorize (New ApiauthParams ()
    {
      Login = "***",
      Password = "***",
      Applicationid = 7644324,
      Settings = settings.all.
    });
    if (vkapi.isauthorized == TRUE)
    {
      MessageBox.Show ("+");
    }
  }

Is it possible to expect two-factor authorization? If yes, how to make


Answer 1, Authority 100%

Two-Factor Authorization:

static void main (String [] Args)
{
  var api = new vkapi ();
  APIAUTHORIZE (New ApiauthParams
  {
    Applicationid = 123456,
    Login = "login",
    Password = "password",
    Settings = settings.all,
    Twofactorauthorization = () = & gt;
    {
      Console.WriteLine ("Enter Code:");
      RETURN CONSOLE.REDLINE ();
    }
  });
  Console.Writeline (API.Token);
}

https://vknet.github.io/vk/authorize/

If it does not work, then try to get a token through:
https: //oauth.vk.com/Token?grant_type=password&amp ;client_id=2274003&amp ;client_secret=hhbzxrka2uz6jb1inysh&amp ;username=phone_or_mail&password=yourpassword&amp ;v=5.78

(Change the fields there on your login and password).
From some times, VK prohibits issuing full rights to the token.
Perhaps when settings = settings.all there is a trouble.

For this link, you can get a token with full rights.
(How it works can google).

and further – & gt;

static void main (String [] Args)
{
  var api = new vkapi ();
  APIAUTHORIZE (New ApiauthParams
  {
    Accesstoken = "Access_Token"
  });
  Console.Writeline (API.Token);
  var ris = API.groups.get (new groupsgetparams ());
  Console.Writeline (res.TotalCount);
  Console.ReadLine ();
}

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions