Search code examples
google-api-python-clientgoogle-play-developer-api

google play developer api not returning reviews


i'm trying to get all the reviews of my app from the playstore using the google api python client and the play dev api.

Right now, if i print response, i get

<googleapiclient.discovery.Resource object at 0x10302a990> when (i think) i should be getting all the reviews of my app. Not sure if my code is wrong, or I just didn't get the permissions correctly.

Thanks!

Code:

from google.oauth2 import service_account
import googleapiclient.discovery


SCOPES = ['https://www.googleapis.com/auth/androidpublisher']
SERVICE_ACCOUNT_FILE = 'playcreds.json'

credentials = service_account.Credentials.from_service_account_file(
        SERVICE_ACCOUNT_FILE, scopes=SCOPES)

playstore = googleapiclient.discovery.build('androidpublisher','v2', credentials=credentials)

response = playstore.reviews()

Solution

  • The reviews() is just the service endpoint. Look at the similar samples for listing APKs here.

    Instead, you probably want to try something like playstore.reviews().list(...) with the appropriate parameters from here.