Importing In-App Products from Google Play via API

Overview

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

While it's possible to manually enter products into Magify, this 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 using two Google Play Developer API methods:

Key Benefits

  • Full coverage of all active and inactive in-app products and subscriptions
  • No manual entry — the entire product catalog is imported automatically
  • Reduced workload for marketing, product, and configuration teams

Once imported, you can:

  • Define reward parameters (Customs)
  • Configure product usage context, visuals, and campaign logic

Requirements

Google Play Console Access

  • You must have Admin access to Google Play Console
  • Your app must already contain products under: Google Play Console > Your App > Monetize with Play > Products > In-app Products and Subscriptions

These products will be fetched via API.

Google Cloud Project Access

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

App Bundle ID Must Be Correct

Important: Ensure that the correct Bundle ID (also known as package name) is specified for your Android app in Magify. The Google Play Developer API retrieves in-app products based on this identifier.

If the Bundle ID does not match the app registered in Google Play Console, product import will fail, and the list may be empty or return errors.

Magify also uses the Bundle ID to correctly associate imported products with in-app creatives, contexts, and campaign logic.

Setting Up the Google Cloud Project

  1. Go to 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

Creating a Service Account

  1. Go to IAM & Admin > Service Accounts
magify-google-cloud-console-choose-service-accounts.png
  1. Click Create Service Account.
  2. Enter a name (e.g., iap-sync-bot) and optional description.
  3. Click Create and Continue.
  4. Assign the Editor role.
  5. Click Done.
magify-google-cloud-console-service-permissions.png

Generating the JSON Key

  1. Go to IAM & Admin > Service Accounts
  2. Find the service account you just created
  3. Click the menu icon (⋮) and select Manage Keys
magify-google-cloud-console-service-manage-key.png
  1. Under the Keys tab, click Add key > Create new key.
magify-google-cloud-console-create-key.png
  1. Select JSON format
  2. Click Create — a .json key file will be downloaded

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. Navigate to Users and Permissions.
  3. Click Invite new user.
magify-google-play-console-users-permissions.png
  1. Paste the client_email from the .json file.
magify-google-play-console-client-email.png
  1. Under Permissions, assign the Store Presence role.
magify-google-play-console-users-permissions-store-presence.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.

How Magify Uses the API

Magify uses two official Google Play Developer API methods to import product data:

  • inappproducts.list — for in-app products
  • monetization.subscriptions.list — for subscriptions

The system calls both endpoints every 300 seconds (5 minutes) to retrieve product data. Imported fields include:

  • productId — unique SKU, used as both key and product name
  • defaultPrice — price for the US region (always returned in USD)

Next Steps in Magify

Step 1: Define Customs

Path: Magify > Configuration > Remote Config > Native Elements

  • In the list of imported products, fill in the Customs field — define what the user receives after purchase (e.g., 500 coins, resource pack)
  • Each product must have a default context configured inside the Native Element

The default context is used when:

  • The product is purchased via a promo code
  • The user purchases from the store page and completes the transaction in-app
  • The purchase process is interrupted or incomplete

Step 2: Set Up Product ID Context

Path: Magify > Configuration > Remote Config > Product ID Context > Create New

For each product:

  • Select the Product ID — choose the appropriate product from the dropdown list.
  • Choose the Type:
    • In-App Product ID Context for consumables and non-consumables
    • Subscription Product ID Context for subscriptions
  • Define Customs — visuals, discounts, and reward logic

This configuration controls how the product is displayed to users, integrated into promotions, and interpreted by Magify's campaign logic.

Using Imported Products in Campaigns

Once products and contexts are configured in Remote Config, they’re available throughout the system — including in campaign setup and delivery.

You can now:

  • Reference imported products when building offer logic
  • Use contexts to control targeting and visuals
  • Dynamically apply pricing, visuals, and reward parameters

This setup ensures your campaigns are always connected to accurate and validated product data from Google Play, with full automation and minimal manual effort.

Your integration is complete. Your product catalog is now ready to power scalable monetization and promotional campaigns across Magify.

Related articles

Importing In-App Products from the App Store via API