Importing In-App Products from Google Play via API

Overview

To effectively manage in-app monetization, subscriptions, and promotional campaigns, it's essential to maintain an up-to-date list of all products (SKUs) published in the Google Play Console. These may include one-time purchases (In-app Products) and recurring payments (Subscriptions) used within an Android app.

While it's possible to enter products manually, this approach quickly becomes inefficient when:

  • The number of products is large
  • Products are frequently updated
  • Accuracy and time savings are important

To streamline the process, Magify supports automated product import via the Google Play Developer API, using the inappproducts.list method.

Key benefits of the integration

  • Full coverage of all active products
  • Automatic syncing of new SKUs without manual updates
  • Reduced workload for marketing and technical teams
  • Data refreshed every 5 minutes

Once products are imported into Magify, you can:

  • Define custom parameters — what the user receives after purchase
  • Configure usage context — visuals, promotions, and how the product is displayed

This integration ensures accuracy, saves time, and enables scalable product management within your app.

Requirements

Before setting up the integration, make sure the following prerequisites are met:

Google Play Console Setup

  • You have access to the Google Play Console with Admin-level permissions.
  • The Android app is published or at least available in draft form.
  • All in-app products must be created in advance in the following sections:
    • Google Play Console > Select your app > Monetize with Play > Products > In-app Products (for one-time purchases) and Subscriptions (for recurring purchases)

These products will be automatically fetched through the API during synchronization.

Google Cloud Project

  • A project must be available in Google Cloud Console
  • You must have permission to:
    • Enable APIs
    • Create and manage service accounts
    • Generate authentication keys

Google Cloud Setup

  1. Go to the Google Cloud Console.
  2. In the top navigation bar, either select an existing project or click New project.
magify-google-cloud-console-choose-project.png
  1. If creating a new project, enter a name and click Create.
  1. In the left-hand sidebar, navigate to APIs & Services > Enabled APIs & services.
magify-google-cloud-console-choose-api.png
  1. In the top bar, click + Enable APIs and services.
magify-google-cloud-console-choose-api-enabled.png
  1. In the API Library, search for Google Play Android Developer API.
  2. Select the API and click Enable.
magify-google-cloud-console-android-developer-api.png

Service Account Creation

  1. To create a service account that will be used to authenticate API requests, navigate to the Service Accounts section:
    • In the left-hand sidebar, go to IAM & Admin > Service Accounts. Once there, you’ll be able to create and configure the service account with appropriate permissions.
magify-google-cloud-console-choose-service-accounts.png
  1. Fill in the fields:
    • Service account name: iap-sync-bot
    • Service account ID will be generated automatically
    • (Optional) Add a description
    • Click Create and Continue
    • In the Permissions step: under the Basic category, select the Editor role. This provides a sufficient level of access to use the API.
    • Click Done — the service account will be created.
magify-google-cloud-console-service-permissions.png

Generating the JSON Key

  1. To authorize API requests, you need to generate a private key in JSON format for the service account:
    • In IAM & Admin > Service Accounts, find the account you just created (iap-sync-bot).
    • Click the three dots menu (⋮) next to the account and select Manage keys.
magify-google-cloud-console-service-manage-key.png
  • Under the Keys tab, click Add key > Create new key.
magify-google-cloud-console-create-key.png
  • Choose JSON as the key type.
  • Click Create. A .json file will be downloaded automatically.
  • Open the downloaded .json file and copy the following values:
    • client_email
    • client_id

You’ll need them when linking the service account in the Google Play Console.

Granting Access in Google Play Console

After creating the service account and generating the key, you need to grant it access through the Google Play Console and assign the appropriate permissions.

  1. Go to Google Play Console and sign in with an account that has admin rights.
  2. In the left-hand menu, navigate to: Users and permissions.
  3. Click Invite new user.
magify-google-play-console-users-permissions.png
  1. In the dialog paste the client_email from your service account JSON key into the Email address field.
magify-google-play-console-client-email.png
  1. Under Permissions, assign at least the Release Manager role.
magify-google-play-console-release-manager.png
  1. In the App access section, select specific apps the service account should access, or grant access to all apps.
  1. Click Invite user to send the invitation and complete the setup.

Once accepted, your service account will have the required permissions to access the Google Play Developer API (e.g., inappproducts.list) for the specified apps.

How Magify Uses the API

Once the service account is connected:

  • The system calls the inappproducts.list method every 300 seconds (5 minutes)
  • It checks for new or updated products
  • The following data is imported for each product:
    • productId — used as both product key and name
    • purchaseType — either managedProduct or subscription
    • defaultPrice — always in USD

This ensures consistent and up-to-date product data across all connected systems.

Next Steps in Magify

After products are successfully imported, complete the following setup in the system:

Define custom parameters

  1. Go to: Magify > Configuration > Remote Config > Native Elements
  2. In the list of imported products, fill in the Customs field: Specify what the user receives after purchase (e.g., 500 coins, resource pack, etc.)

Configure Product ID Context

  1. Go to: Magify > Configuration > Remote Config > Product ID Context
  2. For each product, create a context including:
    • Product ID – select the required product from the dropdown
    • Type – choose the appropriate context type:In-App Product ID Context for consumable and non-consumable products,Subscription Product ID Context for subscriptions
    • Customs– used to define how the product is displayed and what the user receives after purchase (e.g., 500 coins, resource pack, etc.). Same structure as in the default reward.

Using Imported Products in Campaigns

Once your in-app products and their contexts are configured in Remote Config, they become available for use across the system — including in campaign setup and delivery.

You can now:

  • Reference imported products directly when building offer logic
  • Use product contexts to control how offers are displayed to users
  • Dynamically apply pricing, visuals, and custom reward parameters in campaigns

This setup ensures your campaigns are always linked to up-to-date, validated product data from Google Play, with full automation and minimal manual effort.

That’s it — your integration is complete. Your product catalog is now automatically synced and ready to power scalable monetization and promotional campaigns across Magify.

Related articles

Importing In App Products From The App Store Via Api