ios - 带有 AFNetworking 的 Youtube API 失败

标签 ios objective-c iphone youtube youtube-api

我正在尝试使用 Youtube API 从特定 channel 中提取所有视频。我在 Google Developers Console 中设置了项目并获得了 API 浏览器 key 。我启用了 YouTube Data API v3,为了安全起见,我启用了 YouTube Analytics API。

我不知道这个错误是什么。谁能帮我。这是我的控制台输出。

"error": {
  "errors": [
 {
  "domain": "usageLimits",
  "reason": "ipRefererBlocked",
  "message": "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed.",
  "extendedHelp": "https://console.developers.google.com"
 }
],
"code": 403,
"message": "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed."
}

最佳答案

您是否在 API 访问面板的“编辑允许的 iOS 应用程序...”中添加了任何包 ID?如果这样做,请将它们全部删除。 iOS 应用:现在应该说“允许任何应用”。这为我解决了这个问题。

关于ios - 带有 AFNetworking 的 Youtube API 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29415393/

相关文章:

ios - 在主项目中使用子项目的xcdatamodelId

iphone - 我可以在 ios 中更改 Google AdMob Ads 的导航栏位置吗?

iOS通知中心注册

iphone - 如何在本地/远程通知上闪烁 iphone 的手电筒

ios - Restkit:未调用 RKRequest 委托(delegate)

ios - 如何拖动图像

iphone - 当我重新加载 UIWebView 的内容时制作翻转动画(或类似的动画)

java - 替代控制结构

iphone - UIActionSheet 取消按钮不关闭操作表

iphone - 在 xib 中创建带有按钮的 View