我有一个问题,我想访问一个带有 is 代码的框:
using (var request1 = new HttpRequestMessage() { RequestUri = new Uri("https://www.box.com/api/oauth2/token"), Method = HttpMethod.Post })
{
HttpContent content = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("grant_type", "authorization_code"),
//new KeyValuePair<string, string>("code", boxAccessCode),
new KeyValuePair<string, string>("client_id", boxClientId),
new KeyValuePair<string, string>("client_secret", boxClientSecret)
}
);
}
但我不知道我能否获得“代码”,而无需进入网络 http://127.0.0.1/?state=security_token%3DKnhMñlkjasdasnM0nHlZA&code=RCaBKsE681239OPyYLLWwutg9Nwmmk
如何通过 c# 获取此代码?