google-api - 谷歌凭据 : This developer account does not own the application

标签 google-api google-api-java-client

我正在使用 Google 客户端库并尝试制作 GET向 Google Play API 请求。

        GoogleCredential credential= new GoogleCredential.Builder().setTransport(netHttpTransport)
                .setJsonFactory(jacksonFactory)
                .setServiceAccountId(CLIENT_ID)
                .setServiceAccountScopes(SCOPE)
                .setServiceAccountPrivateKeyFromP12File(file)
                .build();
                credential.refreshToken();     
        HttpRequestFactory requestFactory =netHttpTransport.createRequestFactory(credential);
        GenericUrl url = new GenericUrl(URI);
        HttpRequest request = requestFactory.buildGetRequest(url);
        HttpResponse response = request.execute();

我得到
 {
  "code" : 401,
  "errors" : [ {
    "domain" : "androidpublisher",
    "message" : "This developer account does not own the application.",
    "reason" : "developerDoesNotOwnApplication"
  } ],
  "message" : "This developer account does not own the application."
}

我的应用程序未发布,这会导致问题吗?

最佳答案

我有同样的问题。发生这种情况是因为您在 Google API 中授权不拥有该应用程序的用户并尝试获取属于您的应用程序的数据。

在本主题中对其进行了很好的描述。 http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=2528691&topic=16285&ctx=topic

您应该通过 OAuth2 授权应用程序的所有者,然后使用获得的 token 使用 Google API。

关于google-api - 谷歌凭据 : This developer account does not own the application,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10966945/

相关文章:

java - com.google.a.a.a.a.l 400 错误请求 { "error": "invalid_grant" } while inserting row in bigquery

javascript - Google api javascript 客户端有时可以工作,有时则未定义

google-maps - Google Maps API key 可能对您的 bundle ID 无效

google-api - google docs api删除所有内容

php - 从我的网站在YouTube channel 上上传视频

java - 使用 Java API 对 Google Drive 进行身份验证时出现异常

javascript - Google Maps API 加载失败 ("' google' is undefined") in IE8

google-api - 如何获取 Google Plus 中帖子的评论?

java - 更新截止日期或使用截止日期创建新任务时出现 400 Bad Request

android - 使用 android 访问 picasa