我正在尝试使用云数据存储 - 我创建了一个可以在https://cloud.google.com/console#/查看的appengine项目。
通过云控制台,我已导航到API,并关闭并重新启动数据存储区API。然后我注册了一个应用程序(Web应用程序,通用)并生成了一个证书。我已经确保从中生成的电子邮件位于“可以编辑”权限的“团队”列表中。
毕竟,我生成的任何请求都返回403.对其他API(例如预测API)的请求正常工作。数据存储区从我的代码库(使用php api)或api资源管理器返回403。
下面是从PHP客户端生成的HTTP请求的转储。任何帮助将不胜感激!
object(Google_HttpRequest)[15]
private 'batchHeaders' =>
array (size=4)
'Content-Type' => string 'application/http' (length=16)
'Content-Transfer-Encoding' => string 'binary' (length=6)
'MIME-Version' => string '1.0' (length=3)
'Content-Length' => string '' (length=0)
protected 'url' => string 'https://www.googleapis.com/datastore/v1beta1/datasets/madlab-sandbox/lookup' (length=75)
protected 'requestMethod' => string 'POST' (length=4)
protected 'requestHeaders' =>
array (size=3)
'content-type' => string 'application/json; charset=UTF-8' (length=31)
'content-length' => int 62
'authorization' => string 'Bearer ya29.AHES6ZSfJmWHLNIrPwQA7wZ3miGCMgxvmUmYl65mfw9J2_v8KgmLMyJV' (length=68)
protected 'postBody' => string '{"keys":[{"path":[{"id":"5629499534213120","kind":"topic"}]}]}' (length=62)
protected 'userAgent' => string 'test google-api-php-client/0.6.4' (length=32)
protected 'responseHttpCode' => int 403
protected 'responseHeaders' =>
array (size=9)
'content-type' => string 'application/json; charset=UTF-8' (length=31)
'date' => string 'Fri, 26 Jul 2013 15:26:13 GMT' (length=29)
'expires' => string 'Fri, 26 Jul 2013 15:26:13 GMT' (length=29)
'cache-control' => string 'private, max-age=0' (length=18)
'x-content-type-options' => string 'nosniff' (length=7)
'x-frame-options' => string 'SAMEORIGIN' (length=10)
'x-xss-protection' => string '1; mode=block' (length=13)
'server' => string 'GSE' (length=3)
'transfer-encoding' => string 'chunked' (length=7)
protected 'responseBody' => string '{
"error": {
"errors": [
{
"domain": "global",
"reason": "PERMISSION_DENIED",
"message": "Unauthorized."
}
],
"code": 403,
"message": "Unauthorized."
}
}
' (length=182)
public 'accessKey' => null
答案 0 :(得分:1)
要解决此问题:
我已在Cloud Datastore公共问题跟踪器上提交此信息: https://github.com/GoogleCloudPlatform/google-cloud-datastore/issues/10
请检查更新。