Google calendar api 将Google Apps MarketPlace的API从OAuth 1.0升级到OAuth 2.0
我在Google apps marketplace上列出了一个用于日历集成的应用程序。因为它是OAuth 1.0,但现在我正在将我的应用程序迁移到OAuth 2.0。我们在Google calendar api 将Google Apps MarketPlace的API从OAuth 1.0升级到OAuth 2.0,google-calendar-api,google-apps,google-apps-marketplace,Google Calendar Api,Google Apps,Google Apps Marketplace,我在Google apps marketplace上列出了一个用于日历集成的应用程序。因为它是OAuth 1.0,但现在我正在将我的应用程序迁移到OAuth 2.0。我们在https://developers.google.com/apps-marketplace/v1migratev2在这里。但当我遵循这些步骤时,我就得到了401(未经授权)。请检查下面的代码我正在做什么迁移一个域 String url = String.Format("https://www.googleap
https://developers.google.com/apps-marketplace/v1migratev2
在这里。但当我遵循这些步骤时,我就得到了401(未经授权)。请检查下面的代码我正在做什么迁移一个域
String url = String.Format("https://www.googleapis.com/appsmarket/v2/upgradableApp/{0}/{1}/{2}", oldAppId, chromeListing, domain);
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "PUT";
request.Headers.Add("Authorization", "OAuth");
Hashtable postObj = new Hashtable();
postObj["Consumer Key"] = oldClientId;
postObj["Consumer Key Secret"] = oldSecret;
String s1 = new JavaScriptSerializer().Serialize(postObj);
var bs = Encoding.UTF8.GetBytes(s1);
using (Stream reqStream = request.GetRequestStream())
{
reqStream.Write(bs, 0, bs.Length);
}
String result = "";
using (WebResponse response = request.GetResponse())
{
using (var sr = new StreamReader(response.GetResponseStream()))
{
result = sr.ReadToEnd();
sr.Close();
}
}
是否有人知道我们需要如何将旧用户迁移到新应用程序。我已经完成了上面链接中提供的所有步骤。提前谢谢