Youtube 例外情况';谷歌服务例外';带着信息

Youtube 例外情况';谷歌服务例外';带着信息,youtube,youtube-api,google-api-php-client,Youtube,Youtube Api,Google Api Php Client,我得到的错误如下 exception 'Google_ServiceException' with message 'Error calling POST https://www.googleapis.com/upload/youtube/v3/videos?part=snippet%2Cstatus&uploadType=multipart: (401) Unauthorized' in D:\wamp\www\youtube\google-api-php-client\src\io\

我得到的错误如下

exception 'Google_ServiceException' with message 'Error calling POST https://www.googleapis.com/upload/youtube/v3/videos?part=snippet%2Cstatus&uploadType=multipart: (401) Unauthorized' in D:\wamp\www\youtube\google-api-php-client\src\io\Google_REST.php:66 Stack trace: #0 D:\wamp\www\youtube\google-api-php-client\src\io\Google_REST.php(36): Google_REST::decodeHttpResponse(Object(Google_HttpRequest)) #1 D:\wamp\www\youtube\google-api-php-client\src\service\Google_ServiceResource.php(186): Google_REST::execute(Object(Google_HttpRequest)) #2 D:\wamp\www\youtube\google-api-php-client\src\contrib\Google_YouTubeService.php(887): Google_ServiceResource->__call('insert', Array) #3 D:\wamp\www\youtube\index.php(67): Google_VideosServiceResource->insert('snippet,status', Object(Google_Video), Array) #4 {main}

我想制作一个脚本,用于在YouTube上上传视频。我正在使用这行代码。认证和所有工作正常,但不上传视频

您应该从您的客户端设置该代码中的客户端id和密码。还可以在该控制台中启用数据API v3。

ya我已经设置了setClientId、setClientSecret、setDeveloperKey等,还可以启用tube API。这个脚本可以在一些gmail帐户中使用,但有些却不行。那么,这背后的原因是什么?