超出配额指标“请求”的配额并限制服务“mybusinessaccountmanagement.googleapis.com”的“每分钟请求数”

时间:2021-03-24 17:01:06

标签: google-api google-api-dotnet-client

我在提出第一个请求后收到此错误:

<块引用>

配额指标 'Requests' 超出配额并限制 'Requests per 分钟”服务“mybusinessaccountmanagement.googleapis.com”

我如何在第一次请求后超出配额?

if(File.Exists(ApplicationVariables.CertPath)) { 
                    GoogleCredential credential;
                    using (var stream = new FileStream(ApplicationVariables.CertPath, FileMode.Open, FileAccess.Read))
                    {
                        credential = GoogleCredential.FromStream(stream).CreateScoped("https://www.googleapis.com/auth/business.manage");
                    }

                    // Create the service.
                    var service = new MyBusinessAccountManagementService(new BaseClientService.Initializer()
                        {
                            HttpClientInitializer = credential,
                            ApplicationName = "Google Reviews Downloader",
                        });

                    //var bookshelves = await service.Mylibrary.Bookshelves.List().ExecuteAsync();
                    var accounts = await service.Accounts.List().ExecuteAsync();

                    Console.WriteLine("accounts:" + accounts);

                }

1 个答案:

答案 0 :(得分:1)

这完全取决于您目前有多少配额。

当您在 Google 开发者控制台中启用 My Business Account Management API 时。默认配额为 0

enter image description here

我建议您尝试添加额外的配额。

enter image description here

您将不得不单击配额页面链接并在那里挖掘一段时间,直到您弄清楚如何增加配额,他们最近更改了它,您可能需要申请配额,我不确定这个 api。< /p>

我已经尝试过,但对于如何申请配额或增加配额,我并不明智。我想知道这是否是您需要特殊权限才能访问的 API 之一。我不确定你是如何获得这个许可的,但我会做一些挖掘。

相关问题