const string client_id 6ba3d4e99c1b4c61bc69 328c53ea7093 const string

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
const string client_id = "6ba3d4e99c1b4c61bc69328c53ea7093";
const string client_secret = "2932192d1f054f90b7fb10f0ddcfa686";
const string redirect_uri = "https://localhost";
const string request_uri = "https://api.instagram.com/oauth/authorize/?client_id=" +
client_id + "&redirect_uri=" + redirect_uri + "&response_type=code";
var values = new List<KeyValuePair<string, string>>();
values.Add(new KeyValuePair<string, string>("login", "vlan2000vlan2000vlan2000"));
values.Add(new KeyValuePair<string, string>("password ", "Xnikavr1"));
var content = new FormUrlEncodedContent(values);
string resp;
using (var client = new HttpClient())
{
HttpResponseMessage response = await client.PostAsync(request_uri, content);
bool succsess = response.IsSuccessStatusCode;
HttpRequestMessage msg = response.RequestMessage;
var responseString = await response.Content.ReadAsStringAsync();
resp = responseString;
}