rails qr_code超出未经身份验证的每日限制

时间:2016-02-18 13:22:02

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

我在Ruby on rails应用程序中工作。我们使用" gem googl "使用网址缩短API 并已注册并为其创建了一个项目。我们已启用API并已创建公共API访问密钥。 我们已将允许调用的域列入白名单。我们正在使用单独的Google开发者控制台帐户。不是生意。

前2或3天一切正常。然后突然我们每次打电话都开始收到此错误消息:

Exception: {"error"=>{"errors"=>[{"domain"=>"usageLimits", "reason"=>"dailyLimitExceededUnreg", "message"=>"Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.", "extendedHelp"=>"https://code.google.com/apis/console"}], "code"=>403, "message"=>"Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."}}

我们已针对此错误谷歌所有不同的论坛。但还没有找到解决方案。

我们需要做什么?

1 个答案:

答案 0 :(得分:0)

我使用gem' rqrcode_png'解决了这个问题,我创建了一个方法xyz并在xyz方法中使用了这个: self.shortened_url = open(urlShortener uuid_url, "UserAgent" => "Ruby Script").read self.qr_code_url = RQRCode::QRCode.new("#{shortened_url}").to_img.resize(150, 150).to_data_url

并调用xyz方法。那就是它。我的问题已经解决了。

相关问题