代码401,当前用户没有足够的权限执行请求的操作
我已经完成了以下操作:
创建一个GCP项目
在GCP Project中启用Google Play Android开发人员API
创建一个服务帐户并授权[服务帐户管理员]和[服务帐户用户]
为服务帐户创建JSON密钥,然后下载JSON文件以在我的后端服务器上配置
- 在Google Play Console中的我的后端服务器上配置,请链接我创建的GCP项目
- 在Google Play控制台中,链接我在Google Play游戏机中 ,启用Play Android开发人员API
赠款服务帐户财务权限
将服务帐户添加到许可测试
(请参阅Internet上的某些实践) 9。编辑应用内产品/订阅信息以更新 10。等待了一个晚上(也许更多),然后进行其他尝试,我不知道我是否需要等待。
然后,我使用后端服务器调用接口:androidPublisher.subscriptionpurchasesservice.get
我将获得401错误:具体错误如下:
{
"msg":{
"error":{
"code":401,
"message":"The current user has insufficient permissions to perform the requested operation.",
"errors":[
{
"message":"The current user has insufficient permissions to perform the requested operation.",
"domain":"androidpublisher",
"reason":"permissionDenied"
}
]
}
}
}
以下是一些操作记录:
4。 Googoogle Play Console中显示的服务帐户
I have done the following:
Create a GCP project
Enable Google Play Android Developer API in GCP project
Create a service account and authorize [Service Account Admin] and [Service Account User]
Create a json key for the service account, and download the json file to configure on my backend server
In the Google Play console, link the GCP project I created
In the Google Play console, enable the Play Android Developer API
Grant service account financial permissions
Add the service account to the licensing test
(refer to some practices on the Internet)
9. Edit in-app product/subscription information to update
10. After waiting one night (maybe more) and then doing some other attempts, I don't know if I need to wait any longer.
Then I use the backend server to call the interface: androidpublisher.SubscriptionPurchasesService.Get
I will get a 401 error: the specific error is as follows:
{
"msg":{
"error":{
"code":401,
"message":"The current user has insufficient permissions to perform the requested operation.",
"errors":[
{
"message":"The current user has insufficient permissions to perform the requested operation.",
"domain":"androidpublisher",
"reason":"permissionDenied"
}
]
}
}
}
Here are some operational records:
1. Create a service account in a GCP project
3. Associate the Google Play console with the GCP project
4. Service account displayed in GooGoogle play console
5. Grant service account financial permissions in GooGoogle play console
6. Add service account to licensing test
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同样的问题,并最终解决了它:
我遵循了原始海报所采取的每一步。此外,受另一个线程的启发,我禁用并重新启用了Google Play订阅产品,等待了几分钟,并且几分钟,并且然后它起作用。希望这对您有帮助!
I encountered the same issue and eventually resolved it:
I followed every step that the original poster had taken. Additionally, inspired by another thread, I disabled and re-enabled the Google Play subscription products, waited for a few minutes, and then it worked. I hope this helps you!