Nicht in der Lage zu Holen Sie sich die Informationen zu den Abonnements von Google Play Android Developer API

Ich'trying die Verwendung von Google APIs-Client-Bibliothek für Java, um Informationen über Benutzer-Abonnements erworben in meine android-app. Hier ist, wie mache ich denn jetzt:

HttpTransport HTTP_TRANSPORT = new NetHttpTransport();
JsonFactory JSON_FACTORY = new JacksonFactory();

GoogleCredential credential = new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT)
                    .setJsonFactory(JSON_FACTORY)
                    .setServiceAccountId(GOOGLE_CLIENT_MAIL)
                    .setServiceAccountScopes("https://www.googleapis.com/auth/androidpublisher")
                    .setServiceAccountPrivateKeyFromP12File(new File(GOOGLE_KEY_FILE_PATH))
                    .build();

Androidpublisher publisher = new Androidpublisher.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential).
                    setApplicationName(GOOGLE_PRODUCT_NAME).
                    build();

Androidpublisher.Purchases purchases = publisher.purchases();
Get get = purchases.get("XXXXX", subscriptionId, token);
SubscriptionPurchase subscripcion = get.execute(); //Exception returned here

GOOGLE_CLIENT_MAIL ist die E-Mail-Adresse von API-Zugriff über die Google-Konsole.
GOOGLE_KEY_FILE_PATH ist die p12-Datei heruntergeladen API-Zugriff.
GOOGLE_PRODUCT_NAME ist der Produkt name von der branding-Informationen.
In der Google APIS-Konsole den Dienst "Google Play Android Developer API" aktiviert ist.

Was ich bekomme ist:

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

Ich wirklich zu schätzen Ihre Hilfe für dieses Problem...

InformationsquelleAutor der Frage Jonathan Naguin | 2012-06-20

Schreibe einen Kommentar