我有一个Google开发者控制台流程,启用了Google Play Developer API,该项目已链接到Google Play项目。在Google Dev控制台项目中,创建了OAuth客户端ID(Web应用程序)(我是项目的所有者)。使用“client_id”和“client_secret”进行身份验证。试图在Python中使用google-api-client,Google Developer API Playground发送请求列出我们应用的评论,但收到错误:“当前用户没有足够的权限来执行请求的操作。”详情如下:要求:
GET /androidpublisher/v2/applications/<package_name>/reviews
响应:
"error": {
"code": 401,
"message": "The current user has insufficient permissions to perform the requested operation.",
"errors": [
{
"domain": "androidpublisher",
"message": "The current user has insufficient permissions to perform the requested operation.",
"reason": "permissionDenied"
}
]
}
}
我错过了什么吗?
确保您已正确完成所有操作,如下所示。
在Google Play控制台中添加新用户后,Google最多需要24小时才能传播所有api的所有访问权限。
当我试图使用oauth2 flow访问Inapp purchases status api时,我遇到了同样的问题。这不是官方记录,但这个github comment帮助我解决了这个问题。
我使用了服务密钥并在Google API凭据云平台中创建了它,在我将创建的服务密钥添加到Google Developer Console并具有所有访问权限之前,我遇到了同样的问题。
我知道您已经在Google Developer Console中创建了凭据,但也许我的经验会帮助其他人