Google cloud platform 对Google API的请求停止工作,如何调试该问题?

Google cloud platform 对Google API的请求停止工作,如何调试该问题?,google-cloud-platform,google-calendar-api,Google Cloud Platform,Google Calendar Api,我们的服务使用谷歌日历API从多个谷歌账户获取事件。 那些谷歌账户属于我们的客户,他们授予我们相关许可。 这笔赠款是发给我们谷歌云帐户上特定项目的OAuth2.0客户的 我正在使用一个库,在调试时,我能够重现问题: client = Google::APIClient.new(:application_name => 'vCita', :application_version => 'Production') client.authorization.client_id = &quo

我们的服务使用谷歌日历API从多个谷歌账户获取事件。 那些谷歌账户属于我们的客户,他们授予我们相关许可。 这笔赠款是发给我们谷歌云帐户上特定项目的OAuth2.0客户的

我正在使用一个库,在调试时,我能够重现问题:

client = Google::APIClient.new(:application_name => 'vCita', :application_version => 'Production')
client.authorization.client_id = "XXX.apps.googleusercontent.com"
client.authorization.client_secret = "XXX"
client.authorization.access_token = "XXX"
client.authorization.refresh_token = "XXX"
document_base = client.discovery_uri('calendar', 'v3')
response = client.execute!(
    :http_method => :get,
    :uri => document_base,
    :authenticated => false
)
response.data
答复:

<Google::APIClient::Result:0x0055ca4a090488 @request=#<Google::APIClient::Request:0x0055ca4a15b0c0 @parameters={}, @headers={"User-Agent"=>"vCita/Production google-api-ruby-client/0.6.4 Linux/4.15.0-1050-aws"}, @api_method=nil, @authenticated=false, @authorization=nil, @body="", @http_method=:get, @uri=#<Addressable::URI:0x2ae5250ad734 URI:https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest>>, @response=#<Faraday::Response:0x0055ca4a090528 @env={:method=>:get, :body=>"<HTML><HEAD><meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\n<TITLE>302 Moved</TITLE></HEAD><BODY>\n<H1>302 Moved</H1>\nThe document has moved\n<A HREF=\"https://www.google.com/sorry/index?continue=https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest&amp;q=EgQ2VD-rGKaTvvgFIhkA8aeDS9sKbMBCFduKBeOfzZAR8ZN7WerwMgFj\">here</A>.\r\n</BODY></HTML>\r\n", :url=>#<URI::HTTPS:0x0055ca4a121d20 URL:https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest>, :request_headers=>{"User-Agent"=>"X/Y google-api-ruby-client/0.6.4 Linux/4.15.0-1050-aws", "Content-Type"=>"application/x-www-form-urlencoded"}, :parallel_manager=>nil, :request=>{:proxy=>nil}, :ssl=>{}, :status=>302, :response_headers=>{"location"=>"https://www.google.com/sorry/index?continue=https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest&q=EgQ2VD-rGKaTvvgFIhkA8aeDS9sKbMBCFduKBeOfzZAR8ZN7WerwMgFj", "date"=>"Wed, 15 Jul 2020 22:56:38 GMT", "pragma"=>"no-cache", "expires"=>"Fri, 01 Jan 1990 00:00:00 GMT", "cache-control"=>"no-store, no-cache, must-revalidate", "content-type"=>"text/html; charset=UTF-8", "server"=>"HTTP server (unknown)", "content-length"=>"365", "x-xss-protection"=>"0", "alt-svc"=>"h3-29=\":443\"; ma=2592000,h3-27=\":443\"; ma=2592000,h3-25=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"", "connection"=>"close"}, :response=>#<Faraday::Response:0x0055ca4a090528 ...>}, @on_complete_callbacks=[]>>

对如何调试这个问题有什么建议吗? 我一直试图通过谷歌的支持来解决这个问题,但没有成功

请告知,
谢谢

它看起来像谷歌日历API上的一个bug。 我们在尝试发现日历API时收到了一个面向人的验证码响应:

client.discovery_uri('calendar', 'v3')
有关详细信息,请参阅:
它看起来像谷歌日历API上的一个bug。 我们在尝试发现日历API时收到了一个面向人的验证码响应:

client.discovery_uri('calendar', 'v3')
有关详细信息,请参阅: