Youtube Data API v3 总是给我错误

Youtube Data API v3 always give me error

我正在尝试创建一个允许用户将视频上传到 youtube 的任务

我正在尝试让这个应用正常运行:https://github.com/youtube/yt-direct-lite-android

但它总是给我以下错误

com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
  "code": 403,
  "errors": [
    {
      "domain": "usageLimits",
      "message": "Access Not Configured. The API (YouTube Data API) is not enabled for your project. Please use the Google Developers Console to update your configuration.",
      "reason": "accessNotConfigured",
      "extendedHelp": "https://console.developers.google.com"
    }
  ],
  "message": "Access Not Configured. The API (YouTube Data API) is not enabled for your project. Please use the Google Developers Console to update your configuration."
}

尽管我已经在 Auth2.0 中添加了 android API 密钥,但没有它但没有任何效果。

任何人都可以帮忙,或者至少给我一个上传 youtube 视频的简单示例。

在我的 google 帐户

上启用 youtube 服务后,这个例子终于对我有用了

使用以下 link:https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.channels.list

我在以下网站上找到了之前的link:http://www.codeproject.com/Articles/888694/Youtube-Data-API-v-on-Android-Introduction