我正在制作一个不需要用户帐户/登录的应用程序,并允许用户购买订阅.我想使用Google Play Developer API来验证用户是否有购买/有效订阅.从所有文档中,我收集了以下步骤.
它们是否正确,您能否回答其中的两个问题?
此外,我有一个Web服务,虽然我对Web服务或Web服务编程一无所知......我只知道它可能需要在这里使用.
编辑:这些步骤不正确.请参阅下面的答案,了解正确的步骤.但请注意,这仅适用于使用服务帐户(因为我不想要求用户必须明确允许API访问)
我有一个启用了Google Play开发人员API的Google开发人员控制台程序,并且该项目已链接到Google Play项目。在Google Dev控制台项目中,创建了OAuth客户端ID(网络应用程序)(我是该项目的所有者)。使用“ client_id”和“ client_secret”进行身份验证。尝试在Python中使用google-api-client时,Google Developer API Playground发送请求以列出我们的应用程序的评论,但出现错误:“当前用户没有足够的权限来执行请求的操作。” 详细信息如下:请求:
GET /androidpublisher/v2/applications/<package_name>/reviews
Run Code Online (Sandbox Code Playgroud)
响应:
"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"
}
]
}
}
Run Code Online (Sandbox Code Playgroud)
我有想念吗?