dailyLimitExceededUnreg:超出未经身份验证的使用的每日限制

时间:2016-06-06 11:36:29

标签: ruby-on-rails ruby ruby-on-rails-3 google-app-engine google-calendar-api

注意:在发布之前,我在堆栈溢出中读取类似的问题。

嗨,我正在使用 google-api-client -v' 0.9.8' 更新我遇到问题

client_secrets = Google::APIClient::ClientSecrets.load("/home/secrets.json")
@auth_client = client_secrets.to_authorization
        @auth_client.update!(
          :scope => 'https://www.googleapis.com/auth/calendar',
          :access_type => "offline", #will make refresh_token available
          :approval_prompt =>'force',
          :redirect_uri => 'http://someurl.com'
        )
 url = @auth_client.authorization_uri 
link = "https://accounts.google.com/o/oauth2/auth?#{url.query}" 

当您点击链接时,网址会被重定向到代码将被生成的网页

@auth_client.code = "generated code"
@auth_client.fetch_access_token!

生成 access_token refresh_token

service = Google::Apis::CalendarV3::CalendarService.new
response = service.list_events('primary',max_results: 10,single_events: true,order_by: 'startTime',time_min: Time.now.iso8601)

这一点问题将会出现

dailyLimitExceededUnreg: Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.

FYI 我在google开发者控制台中启用了google calendar api。

如果有人解决了这个问题,请告诉我。

1 个答案:

答案 0 :(得分:0)

<!DOCTYPE html> <html> <head> <title>Center of Rocket League eSports!</title> <link href="style.php" type="text/css" rel="stylesheet" /> <link href="http://quersteil.eu//data/favicon.png" type="image/png" rel="icon"> <meta charset="UTF-8" /> <meta name="description" content="RocketLeague-Base provides every aspect of Rocket League eSports: News, Matches, Results, Events, Statistics and many more" /> </head> <body> <div id="header"> <div id="header_content"> <div id="header_logo"> <a href="http://quersteil.eu/"></a> </div> <div id="header_navbar"> <div id="news"><a href="index.php?page=news">News</a> </div> <div id="matches"><a href="index.php?page=matches">Matches</a> </div> <div id="results"><a href="index.php?page=results">Results</a> </div> <div id="events"><a href="index.php?page=events">Events</a> </div> <div id="stats"><a href="index.php?page=stats">Stats</a> </div> </div> </div> </div> <div id="layout"> <div id="layout_left"> <div id="content_left"> <div id="heading">Welcome to RocketLeague-Base.com!</div> <br>This site is currently under construction and is getting developed further and further everyday, be sure to check every now and then. When the site has finished it will be a data and information driven website all around Rocket League, comparable towards <a href="http://www.hltv.org/" target="_blank">HLTV.org</a>. Rocket League eSports is on the rise and as are the expectations of everyone watching, to have an easy way looking for all the eSports action surrounding Rocket League. We are in the makings of finishing the website as soon as possible, so that every Rocket League fan has a comfortable way to look at all News, Matches, Results, Events and Stats all around the great RL-eSports Scene. No need to go to 5 different webpages anymore to look at upcoming matches or past Results, RocketLeague-Base.com is the solution! </div> <div id="content_left"> Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. </div> <div id="content_left"> Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. </div> <div id="content_left"> Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. </div> </div> <!-- --> <div id="layout_right"> <div id="content_right"> <img src="data/facebook.png"> <img src="data/twitter.png"> </div> </div> </div> </body> </html>存储在变量(例如<area target="" name="green2" alt="green2" title="green2" href="" coords="549,178,25" shape="circle"> <area target="" name="yellow1" alt="yellow1" title="yellow1" href="" coords="766,179,26" shape="circle"> <area target="" name="green1" alt="green1" title="green1" href="" coords="287,425,24" shape="circle">

尝试

@auth_client.fetch_access_token!

如果失败,我建议您查看官方Google documentation的日历服务(Ruby)