from googleapiclient.discovery import build from oauth2client.service_account import ServiceAccountCredentials import httplib2 http = httplib2.Http(timeout=30) credentials = ServiceAccountCredentials.from_json_keyfile_name( "credentials.json", "https://www.googleapis.com/auth/androidpublisher" ) http = credentials.authorize(http) service = build('androidpublisher', 'v3', http=http) # android_in_app = service.purchases().products().get(packageName=package_name, # productId="{}.{}".format(package_name, product, token=token)).execute() products = service.inappproducts().list(packageName="mobile.chefclub.App").execute() print("%s products" % len(products)) package_name = "mobile.chefclub.App" token = "gepkfnlflefaghcnnioohhbd.AO-J1OyYB7ProV2FCuCZzxT4eh5Da47f3JsTqTxuJP-9oc4FkdJdOwA6RDwVGUQ9rJJUcDy3Y3Ffv_Rswmu4fbrt2lvjAsWzdGHMzFibog1OfLhHfxP0ru81W6Qjv5KdTpBMgtXs6tt6sd5eBxQjXCiWjmyVeLB__Q" # The token provided to the user's device when the inapp product was purchased. android_in_app = service.purchases().subscriptions().get(packageName=package_name, subscriptionId="mobile.chefclub.test_premium_subscription", token=token).execute() print(android_in_app)