我正在创建与IBM verse同步的应用程序。根据{{3}}我已注册申请。在第二步中,我试图获取授权码。为此,我的应用程序应重定向到Web浏览器但未能这样做。我做错了什么?请建议。
String requrl = "https://apps.na.collabserv.com/manage/oauth2/authorize";
WebRequest request = WebRequest.Create(requrl);
request.UseDefaultCredentials = true;
request.Headers.Add("response_type", "code");
request.Headers.Add("client_id", "app_1000233222_1505984966292");
request.Headers.Add("callback_uri", "https://localhost/callback");
request.Method = "GET";
using (WebResponse response = request.GetResponse())
{
using (Stream stream = response.GetResponseStream())
{
XmlTextReader reader = new XmlTextReader(stream);
}
}