听起来您需要按照说明注册您的应用
来自https://developers.google.com/youtube/v3/
Register your application with Google so that it can submit API requests.
此页面有详细信息
https://developers.google.com/youtube/registering_an_application
获取授权凭证
您的应用程序必须具有授权凭据才能使用 YouTube 数据 API。本文档介绍了 Google Developers Console 支持的不同类型的授权凭据。它还解释了如何为您的项目查找或创建授权凭证。
创建您的项目并选择 API 服务
Go to the Google Developers Console.
Select a project.
In the sidebar on the left, select APIs & auth. In the list of APIs, make sure the status is ON for the YouTube Data API v3.
In the sidebar on the left, select Credentials.
The API supports two types of credentials. Create whichever credentials are appropriate for your project:
OAuth 2.0: Your application must send an OAuth 2.0 token with any request that accesses private user data. Your application sends a
客户端 ID,可能还有用于获取令牌的客户端密码。您可以为 Web 应用程序、服务帐户或已安装的应用程序生成 OAuth 2.0 凭据。
Learn more
API keys: A request that does not provide an OAuth 2.0 token must send an API key. The key identifies your project and provides API
访问、配额和报告。
If the key type you need does not already exist, create an API key by selecting Create New Key and then selecting the appropriate key
类型。然后输入该密钥类型所需的附加数据。