我有一个Google Dev控制台进程与Google Play开发人员API是启用的,该项目是链接到Google Play项目。在Google Dev console项目中,创建了一个服务帐户(我是该项目的所有者)。之后,我创建了一个json文件密钥来进行身份验证。尝试在PHP中使用google- API -client,Google Developer API Playground发送请求到应用程序内购买我的应用程序的详细信息,但得到错误:“当前用户没有足够的权限执行请求的操作。”具体内容如下:
请求:
GET Request https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/products/{productId}/tokens/{token}?access_token={access_token}
响应
Array
(
[error] => Array
(
[code] => 401
[message] => The current user has insufficient permissions to perform the requested operation.
[errors] => Array
(
[0] => Array
(
[message] => The current user has insufficient permissions to perform the requested operation.
[domain] => androidpublisher
[reason] => permissionDenied
)
)
)
)
发布于 2021-11-30 18:57:02
Method: purchases.products.get对私有用户数据进行操作。由于您使用Oauth2对用户进行授权并获得访问令牌。
此方法要求用户同意以下范围
错误消息The current user has insufficient permissions to perform the requested operation.
意味着两件事中的一个。
https://stackoverflow.com/questions/70174007
复制相似问题