我们为什么会收到此错误?远程服务器返回错误:(403)在调用google api时被禁止

时间:2015-04-17 14:34:34

标签: google-api

为什么我们收到此错误?远程服务器返回错误:(403)在调用google api时被禁止。我们一直在使用它,但现在得到这个错误。这是我们的代码:

try
{
            NameValueCollection data = new NameValueCollection();
            data.Add("accountType", "GOOGLE");
            data.Add("Email", Settings.Default.AnalyticsAdmin);

            data.Add("Passwd", Settings.Default.AnalyticsAdminCredentials);
            data.Add("service", "analytics");
            data.Add("source", this.GetType().FullName);

            //xml = this.GetType().FullName + ":" + Settings.Default.AnalyticsAdmin + ":" + Settings.Default.AnalyticsAdminCredentials;

            using (WebClient client = new WebClient())
            {
                String tokens = Encoding.UTF8.GetString(client.UploadValues(https://www.google.com/accounts/ClientLogin, "POST", data));
            }

0 个答案:

没有答案