我知道这个问题已经在这里被问过好几次了,但没有一个解决方案对我有用。
以下是我创建服务帐户的步骤:
- 登录到 Google Play 控制台帐户。
- 然后从左侧面板导航到设置 > API 访问。
- 向下滚动到服务帐户部分,然后单击创建服务帐户。
- 按照打开的对话框中提到的说明进行操作。
- 在 Google API 控制台上创建服务帐户时,选择服务帐户权限作为项目 > 所有者
- 创建密钥并以 json 格式下载。
- 现在回到 Google Play Console 并单击授予访问权限以授予管理员权限。
现在我正在使用此服务帐户来验证服务器上的应用内购买,但我收到此错误:
{
"errors": [
{
"domain": "androidpublisher",
"reason": "permissionDenied",
"message": "The current user has insufficient permissions to perform the requested operation."
}
],
"code": 401,
"message": "The current user has insufficient permissions to perform the requested operation."
}
}
我正在使用这个 php lib和服务帐户方法来验证购买。