未配置访问。 YouTube 数据 API 尚未在项目 608941808256 中使用

问题描述 投票:0回答:4

我已经为我的项目启用了 YouTube 数据 API 和 Google+ API,并更改了 Auth.java 中的 Android API 密钥,我还将播放列表信息输入到 Constants.java 中。但是我仍然收到这个无用的错误:

com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden

{
  "code": 403,
  "errors": [
  {
    "domain": "usageLimits",
    "message": "Access Not Configured. YouTube Data API has not been used in project 608941808256 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube/overview?project=608941808256 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
    "reason": "accessNotConfigured",
    "extendedHelp": "https://console.developers.google.com/apis/api/youtube/overview?project=608941808256"
    }
  ],
  "message": "Access Not Configured. YouTube Data API has not been used in project 608941808256 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube/overview?project=608941808256 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
}

有人可以帮助我吗

android youtube youtube-data-api
4个回答
57
投票

我们也有同样的问题。我们通过从头开始并创建一个全新的 API 项目来解决这个问题。由于某种原因,现有的 API 项目无法运行。检查您是否遇到此问题的步骤:

  • 在 API 控制台中创建一个新项目(单击窗口顶部的项目下拉列表,然后选择“新建项目”)。
  • 启用所需的 API(例如 YouTube 数据)。
  • 转到凭据 -> 域验证并输入您的域。
  • 填写OAuth同意屏幕,并使“应用程序名称”与您的项目名称相同。还要选择您将使用的范围,添加您的域名,保存并提交以供验证。
  • 创建“OAuth2 客户端密钥->Web 应用程序”类型的凭据并输入正确的回调 uri。
  • 等几个小时。

您现在应该能够在 API 资源管理器中进行测试(输入您自己的客户端密钥)。


2
投票

我这里也遇到同样的问题。 除了启用 Google+ API 和联系人 API 之外,我还必须为 Web 应用程序创建一个新的 OAuth 客户端密钥。

创建它时,您会看到客户端 ID 将以错误消息中的项目 ID 开头。

总而言之,您必须执行以下操作:

  1. 使用 Web 应用程序类型创建 OAuth 客户端密钥
  2. 以及您 API 的客户端 ID

然后您应该能够进行身份验证。

希望我能帮忙。


0
投票

我通过创建一个新项目然后创建新凭据解决了这个问题


0
投票

转到 => https://console.developers.google.com/apis/api/youtube/overview?project=608941808256

转到“启用的 API 和服务”

点击“YouTube 数据 API v3”

单击启用

© www.soinside.com 2019 - 2024. All rights reserved.