403 错误:用于调用 Google Play Developer API 的项目 ID 尚未在 Google Play Developer Console 中链接

Nov*_*der 5 android google-api google-play

我正在使用 Google Play Developer Console 帐户的 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."
 }
}
Run Code Online (Sandbox Code Playgroud)

我实际上确实链接了我的 Google Play Developer API 项目: 在此处输入图片说明

为什么谷歌一直给我这个错误?

JSt*_*hen 2

这可能不是OP想要的,但我在寻找使用服务帐户时收到完全相同错误的答案时偶然发现了这一点。如果它对其他人有帮助,请确保您使用属于链接项目的服务帐户的 json 密钥。

我刚刚遇到了同样的问题,就我而言,我在 Google Dev 控制台中有三个项目,当在它和 Google Play Dev 控制台之间切换时,我最终在 Google Dev 端进入了错误的项目。经过一番困惑后,我进入了 Google Dev 控制台,确保我位于链接的项目中,进入服务帐户并为服务帐户生成了一个新的 json 密钥,更新了我的脚本以使用它,现在我收到了正确的信息来自谷歌的回应。

json 键应以您在 Google Play 开发控制台中链接的相同项目名称开头。当使用错误项目中的一个时,我得到了与问题中完全相同的响应。