djandreski
djandreski

Reputation: 434

Can't retrieve the play store reviews for my app

I am trying to get the reviews for my app from the playstore using the new reviews api from the android publisher service. The app key is me.jadi (https://play.google.com/store/apps/details?id=me.jadi) as you can see it have reviews posted for it.

Here is the code I'm using:

var google = require('googleapis');
var secrets = require('./secrets.json');
var androidpublisher = google.androidpublisher('v2');

var authClient = new google.auth.JWT(
    secrets.client_email, null, secrets.private_key, 
    ['https://www.googleapis.com/auth/androidpublisher'], null);

authClient.authorize(function (err, tokens) {
  if (err) {
    return console.log(err);
  }
  androidpublisher.reviews.list({ auth: authClient, packageName: 'me.jadi' }, function (err, resp) {
    if (err) {
      return console.log(err);
    }
  });
});

It doesn't contain any errors for the auth nor for the actual service request. But the result is always an empty object. So I'm trying to identify the problem,

Upvotes: 0

Views: 703

Answers (1)

djandreski
djandreski

Reputation: 434

I found the answer my self, and I'll post it here for future reference.

The problem with my specific case was that I didn't have reviews posted or modified in the last week. And the API documentation clearly states that it will keep history of the reviews in the last seven days.

Once I get a new review I tried the code and the review was successfully retrieved.

Upvotes: 1

Related Questions