N
N
n0namer2017-07-22 19:41:00
OAuth
n0namer, 2017-07-22 19:41:00

How to log in to a site using OAuth2 from a .NET application?

There is a site with authorization through VK. I want to automate the receipt of information from it using Sharpe. Stuck on login. Knowledge of OAuth and web technologies tends to zero. Advise materials on this subject, you need to quickly get the result.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yuri Esin, 2017-07-24
@Exomode

With HttpClient, it also supports HTTPS.

using (HttpClient client = new HttpClient())
{
    var response = await client.GetAsync("https://api.vk.com/method?");
}

Next is a matter of technology. Follow the documentation, register your application, get a ServiceToken, then get tokens for the user or for coo. If you are too lazy to mess with your bike, I recommend Citrina and similar wrapper frameworks over VK.API, they have already been implemented quite a few. For authorization without OAuth, I recommend VK.NET, but in some places there are jambs that you need to edit yourself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question