【发布时间】:2021-02-18 04:15:55
【问题描述】:
我有一个以 mymanager@gmail.com 为经理的 YouTube 频道。 我已经为我的域 ssss.org 设置了一个 Google Cloud 帐户(免费试用)。 我编写了 OAuth 代码来访问 YT API 并激活了 YT API。 我运行代码并以 me@ssss.org 身份进行身份验证。 我打电话:
$youtube = new Google_Service_YouTube($client);
try {
$channel = $youtube->channels->listChannels('snippet', ['mine' => TRUE]);...
并收到异常消息:"Unauthorized", "errors": [ { "message": "Unauthorized", "domain": "youtube.header", "reason": "youtubeSignupRequired", "location": "Authorization", "locationType": "header" }
我将 me@ssss.org 添加为 YT 帐户的经理,并点击了“访问 xxx 的邀请”电子邮件中的链接。 这没问题,但随后在提到关于 G Suite 试用的 https://support.google.com/a/answer/9000768 时出现错误。
将 GC 与我的 YT 帐户关联的最佳方法是什么?
【问题讨论】:
标签: php google-cloud-platform google-api google-oauth google-api-php-client