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

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

问题描述

使用服务帐户访问Google Play开发者API时出现以下错误:

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

用于调用Google Play开发者API的项目ID尚未在Google Play开发者控制台中链接.

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

服务帐户电子邮件和.p12文件是使用APIs&Auth -> Credentials中的服务帐户选项生成的. Google Play开发者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时仍然出现此错误.我正在寻找针对此错误的解决方案,以及逐步使用Java客户端的Google Publishing API来使用Google Play开发者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.

我在服务器端使用带有alpha版本APK的Google Play开发者服务API v2,并且与您有相同的错误:用于调用Google Play开发者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 Developer Console

  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".

"APIs& auth"子类别凭据">创建新的客户端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开发者控制台">设置">子类别"API访问".

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

链接到链接的项目".

服务帐户"位置可能已经在显示您的服务帐户" CLIENT ID,这使"Google开发者控制台"成为了现实.

"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开发者API的项目ID尚未在Google Play开发者控制台中链接."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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