Get started with custom app publishing

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.

Preliminary setup

Before you can publish private apps on behalf of an enterprise customer, you need to first enable the Google Play Custom App Publishing API for a project, create a service account, and provide a way for the enterprise to delegate publishing rights to that service account.

Enable the Google Play Custom App Publishing API

To enable the Google Play Custom App Publishing API for a project, follow these steps:

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

  2. From the projects list, select a project or create a project.

  3. Open the API Library.

  4. 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

As a part of the setup process, an enterprise needs to delegate private app publishing rights to a service account that you control. This service account must belong to a Cloud project and shouldn’t be programmatically created. The steps below describe the easiest way to create a service account:

  1. Open the Google API Console. Login if prompted.

  2. From the projects list, choose the project that you selected or created when enabling the API.

  3. From the main menu, select IAM & Admin > Service accounts > Create service account.

  4. 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.

Obtain private app publishing rights

As an EMM or third-party app developer, you need to embed a button (or similar feature) into your existing console that sends end users to the Play Console URL below, which guides them through the account delegation process.

https://play.google.com/apps/publish/delegatePrivateApp?service_account=serviceAccountEmail&continueUrl=callbackUrl
  • service_account: Your service account email address.

  • continueUrl: The URL to navigate back to after the user completes the account delegation process. If your URL contains characters outside the ASCII set, use URL encoding. We also strongly recommend that you add a security token to your URL.

The link opens the Play Console, where the user is prompted to create or select an appropriate developer account.

If the user doesn't have a developer account:

The user is shown the sign-in screen, where they have an option to create a developer account. After completing the account creation process, including paying a $25 registration fee, the user is given the option to allow your service account to publish apps privately for their organization.

If the user has a developer account, but isn't signed in to the Play Console:

The user is shown the sign-in screen. After signing in successfully, they are prompted to select the appropriate developer account (if multiple accounts exist). The user is then given the option to allow your selected service account to publish apps privately for their organization.

If the user has a developer account and is signed in to the Play Console:

The user is prompted to select the appropriate developer account (if multiple accounts exist). The user is then given the option to allow your selected service account to publish apps privately for their organization.

allow-private-app-publishing.
Figure 1. User allows a service account to publish private apps.

Retrieve the developer account ID

After the delegation process is complete, the Play Console redirects the user to your designated callback URL (http://foo.com/bar in the example below). A link to the user's developer account and their public developer account ID are passed as arguments.

http://foo.com/bar?developerAccount=developerAccountId&developerAccountLink=https://play.google.com/apps/publish?account=developerAccountId

You need to pass the developer account ID as a parameter when you publish private apps for the user's enterprise.

Enviar comentarios sobre…

Google Play Custom App Publishing API
Google Play Custom App Publishing API