错误:“用于调用 Google Play Developer API 的项目 ID 尚未在 Google Play Developer Console 中链接." [英] Error: 'The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.'

查看:47
本文介绍了错误:“用于调用 Google Play Developer API 的项目 ID 尚未在 Google Play Developer Console 中链接."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用服务帐户访问 Google Play Developer API 时收到以下错误:

I am getting the following error while accessing Google Play Developer API using a service account:

用于调用 Google Play Developer API 的项目 ID 尚未在 Google Play Developer Console 中链接.

The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.

服务帐户电子邮件和 .p12 文件是使用 APIs&Auth -> 中的服务帐户选项生成的.凭据.Google Play Developer API 中的应用程序使用 Google 文档中提到的项目 ID 链接到项目.

The service account email and .p12 file were generated using the service account option in APIs&Auth -> Credentials. The Application in the Google Play Developer API was linked to the project using the project id as mentioned in google's docs.

但是,当我尝试使用发布 API 时仍然遇到此错误.我正在寻找此错误的解决方案,以及使用 Google Play Developer API 为 Java 客户端使用 Google Publishing API 发布 APK 的分步过程.我正在使用 androidpublisher_v2_public.

However, I am still getting this error when I try to use the Publishing API. I am looking for a solution to this error and a step by step process to use the Google Publishing API for the Java client to publish an APK using the Google Play Developer API. I am using androidpublisher_v2_public.

推荐答案

我理解你.Google 会让您对更改服务名称和工作流程感到困惑.他们的文档没有更新到足以匹配他们最新的 API 工作流程.

I understand you. Google confuses you with changing service names and workflows. Their documents aren't updated enough to match their newest API workflows.

我在服务器端使用 Google Play Developer Service API v2 和 alpha 版 APK,并且遇到与您相同的错误:用于调用 Google Play Developer API 的项目 ID 未在Google Play 开发者控制台."

I was using the Google Play Developer Service API v2 on the server-side with an alpha-version APK, and had the same error as you: "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console."

这是我的解决方案:

Google 开发者控制台

  1. Google 开发者控制台">API 和身份验证"子类别API">(API 列表)Google Play Android 开发者 API".将状态"设置为开启".

  1. "Google Developer Console" > "APIs & Auth" subcategory "APIs" > (api list) "Google Play Android Developer API". Set "STATUS" to "ON".

API 和身份验证"子类别凭据">创建新的客户端 ID".选择服务帐户"并创建 ID.

"APIs & auth" subcategory "Credentials" > "Create new Client ID". Choose "Service account" and create the id.

您应该从浏览器获得 P12 密钥.

You should get a P12 key from the browser.

Google Play 开发者控制台

  1. Google Play Developer Console">设置">API 访问"子类别.

  1. "Google Play Developer Console" > "Settings" > subcategory "API access".

制作指向链接项目"的链接.

Make a link to your "Linked Project".

服务帐户"位置可能已经显示了您的服务帐户"客户端 ID,该 ID 生成了谷歌开发者控制台".

"Service Account" place may be already showing your "Service account" CLIENT ID which made "google developer console".

默认情况下,此帐户为灰色,表示它处于非活动状态.所以你必须激活它并手动设置权限.

By default this account is gray indicating that it is not active. So you must activate it and set authority manually.

您现在应该从 API 获得正确的响应.

You should now get a correct response from the API.

如果再次出现同样的错误,可能是因为您在链接项目之前在控制台中配置并购买了产品.

If you get the same error again, maybe is because you have configured and purchased products in your console before linking the project.

要解决此问题,只需在您的应用中添加新产品即可.

To solve it, simply add new product in your app.

祝你好运.

这篇关于错误:“用于调用 Google Play Developer API 的项目 ID 尚未在 Google Play Developer Console 中链接."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆