The Google Play Custom App Publishing API is intended for enterprise mobility management providers (EMMs), third-party app developers, and other organizations who want to enable their enterprise customers to publish private apps (also called custom apps) directly from their end-user interface.
An enterprise customer is an organization that uses managed Google Play to distribute work apps to employees. Each enterprise customer maintains their own managed Google Play store, which can include both public and private apps. Private apps aren't available outside the enterprise—only users with access to the enterprise's managed Google Play store can view and install private apps.
Before you can publish private apps using the Google Play Custom App Publishing API, you need to first enable the Google Play Custom App Publishing API for a project, create a service account, and grant publishing permission to this account on your Play Console developer account.
Enable the Google Play Custom App Publishing API
To enable the Google Play Custom App Publishing API for a project, follow these steps:
Open the Google API Console. If you don't have a Google account, select More options > Create account and then fill in the form to create an account. If you have a Google account, sign in if prompted.
From the projects list, select a project or create a project.
Search the API Library for the Google Play Custom App Publishing API. To enable the API, select it and then click enable.
Create a service account
With the same project for which you've enabled the Google Play Custom App Publishing API, follow these steps to create a service account:
Open the Google API Console. Login if prompted.
From the projects list, choose the project that you selected or created when enabling the API.
From the main menu, select IAM & Admin > Service accounts > Create service account.
Enter a name for your service account and select Furnish a new private key. Then click Create.
Take note of the service account's email address and store the service account's private key file in a location accessible to your application. Your application needs them to make authorized calls to the Google Play Custom App Publishing API.
Grant publishing permission to the service account
To grant publishing permission to the service account you've created, follow these steps:
Open the Play Console
Select an existing developer account or create a new one.
Retrieve the developer account ID
After the setup and permission process is complete, take a note of developer account ID from the Play Console URL:
You need to pass the developer account ID as a parameter when you publish private apps for the user's enterprise.