Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google api 服务帐户json文件是什么样子的?_Google Api_Google Api Php Client_Google Api Client_Service Accounts - Fatal编程技术网

Google api 服务帐户json文件是什么样子的?

Google api 服务帐户json文件是什么样子的?,google-api,google-api-php-client,google-api-client,service-accounts,Google Api,Google Api Php Client,Google Api Client,Service Accounts,因此,当为我想要为我的g-suite开发的自动化系统创建服务帐户时,它提示我下载我认为是服务帐户凭据的内容。 我下载了一个名为client_secret_1181806157637313827329.json的文件,该文件包含以下内容(将删除敏感数据) 但是,我无法获取服务帐户以获得授权。我不断得到以下错误: Uncaught exception 'Google_Service_Exception' with message '{ "error": { "errors": [ { "domain

因此,当为我想要为我的g-suite开发的自动化系统创建服务帐户时,它提示我下载我认为是服务帐户凭据的内容。 我下载了一个名为client_secret_1181806157637313827329.json的文件,该文件包含以下内容(将删除敏感数据)

但是,我无法获取服务帐户以获得授权。我不断得到以下错误:

Uncaught exception 'Google_Service_Exception' with message '{ "error": { "errors": [ { "domain": "global", "reason": "required", "message": "Login Required", "locationType": "header", "location": "Authorization" } ], "code": 401, "message": "Login Required" } }

知道怎么回事吗?

请按照此链接上的指南,确保您正在验证API调用。“需要登录”错误消息表示您尚未对用户进行身份验证,因此未授予您访问权限。

我们需要查看您的代码,然后才能帮助您解决任何问题。
Uncaught exception 'Google_Service_Exception' with message '{ "error": { "errors": [ { "domain": "global", "reason": "required", "message": "Login Required", "locationType": "header", "location": "Authorization" } ], "code": 401, "message": "Login Required" } }