403错误:调用Google Play开发者API使用的项目ID未在Google Play开发者控制台中进行关联。

6
我正在使用Google Play开发者控制台帐户的v2版本。
我前往在线API浏览器创建新的编辑。
我在packageName字段中输入我的包名(com.companyname.appname),点击“执行”,然后收到403错误响应。
{
 "error": {
  "errors": [
   {
    "domain": "androidpublisher",
    "reason": "projectNotLinked",
    "message": "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console."
   }
  ],
  "code": 403,
  "message": "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console."
 }
}

我实际上已经将我的Google Play Developer API项目链接起来了: enter image description here 为什么Google一直给我这个错误?

我现在完美地使用v2版本,当我对一个没有适当权限的账户进行身份验证时,出现了这个错误。 - Krtko
类似问题请参考https://dev59.com/NV8e5IYBdhLWcg3wq8BK - Michael Freidgeim
1个回答

2
这可能不是OP要找的,但当我在寻找使用服务帐户时接收到完全相同错误的答案时,我偶然发现了这个。如果有帮助的话,请确保您正在使用属于链接项目的服务帐户的json密钥。
我遇到了同样的问题,在我的情况下,我在Google Dev侧切换到Google Play Dev控制台时有三个项目。经过很多混淆后,我去了Google Dev控制台,确保我在链接的项目中,转到服务帐户并为服务帐户生成了一个新的json密钥,更新了我的脚本以使用它,现在我从谷歌收到了正确的响应。
json密钥应该以您在Google Play Dev控制台中链接的相同项目名称开头。当使用来自错误项目的密钥时,我会得到与问题中完全相同的响应。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接