【问题标题】:googleAPI: URL shortner gives error on request for shorten the longUrlgoogleAPI:URL 缩短器在请求缩短长 URL 时出错
【发布时间】:2023-03-28 16:45:02
【问题描述】:

您好,我已经使用 google shortner 一个月了,并且尝试缩短 url 大约 50 次,并且成功了。但是今天当我尝试为同一任务缩短 url 时,它向我显示了错误

object(stdClass)#9 (1) { 
["error"]=> object(stdClass)#11 (3) { 
["errors"]=>  array(1) { [0]=> object(stdClass)#12 (4) { 
["domain"]=> string(11) "usageLimits" 
["reason"]=> string(23) "dailyLimitExceededUnreg" 
["message"]=> string(76) "Daily Limit for Unauthenticated Use Exceeded.         Continued use requires signup." 
["extendedHelp"]=> string(36) "https://code.google.com/apis/console" } 
} 
["code"]=> int(403) 
["message"]=> string(76) "Daily Limit for Unauthenticated Use Exceeded.   Continued use requires signup." } 
 }

我无法理解它是什么??? 我已经注册并使用更短的服务一个月了。请帮我解决这个问题

【问题讨论】:

  • 同样的问题,从去年11月就开始使用了
  • 您有任何解决方案或其他选择吗???...

标签: google-api google-url-shortener


【解决方案1】:

Google 限制未应用 API 密钥的开发者的服务量。只需转到开发者控制台,应用您的密钥,然后在您的代码中使用它。

我发现 Google url 更短的 API 仅支持 ANONYMOUS 用户的大约三到四百次重定向服务。之后,您必须通过https://console.developers.google.com/ 注册一个开发者帐户,正确设置,获取指定的 API 密钥,并在您的代码中使用它。

希望这会有所帮助。

【讨论】:

  • 嗯,我试过你建议的这个选项....但是注册应该是高级的,只有我可以访问它。
  • 我已切换到 bitly url shortner 服务,因为 google 不缩短包含 localhost:90 的请求(我的端口 80 用于不同的服务)和 ip 地址。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-05-01
  • 1970-01-01
  • 1970-01-01
  • 2021-04-24
  • 2011-08-20
  • 1970-01-01
相关资源
最近更新 更多