回答关于 google play with service account 的评论

Answering reviews on google play with service account

我想用服务帐户回答我的应用程序评论。但是关于 google 游戏机的 api 文档,为了回答评论,我需要有我的授权密钥。 :

GET https://www.googleapis.com/androidpublisher/v3/applications/your_package_name/reviews?
access_token=your_auth_token

但是在我的 json 文件中,我从我的服务帐户页面上的“创建密钥”获得,我没有类似的东西:“授权令牌”。我该怎么办?

注:我还有 1 个小问题:我想列出 google 游戏的所有应用程序。我发现一些非官方的 api 可以检索特定开发人员的所有应用程序。但是为此我需要有我无法从任何 api.

检索到的人的开发者姓名

But in my json file that i got from "create key" on my service account page, i have nothing like: "auth token". What should i do?

您的授权令牌不在您下载的密钥文件中,它包含请求访问令牌所需的内容。

假设您已在 Google 云控制台上创建服务帐户凭据。您在该文件中拥有的是创建访问令牌所需的凭据。

Your application calls Google APIs on behalf of the service account, so users aren't directly involved. This scenario is sometimes called "two-legged OAuth," or "2LO." (The related term "three-legged OAuth" refers to scenarios in which your application calls Google APIs on behalf of end users, and in which user consent is sometimes required.)

使用服务帐户请求访问令牌需要多个步骤Preparing to make an authorized API call我建议您使用您选择的语言寻找一个客户端库,而不是为了装模作样。

I wanna list all of my applications for google play.

为此,您可能需要通过与服务帐户共享数据来授予服务帐户访问您帐户数据的权限。或者您需要使用 Oauth2 授权您的应用程序,然后您才能访问它。