# 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](https://support.google.com/googleplay/work/answer/6137769) to distribute work
apps to employees. Each enterprise customer maintains their own
[managed Google Play store](https://play.google.com/work), which can include
both public and private apps. [Private apps](https://support.google.com/googleplay/work/topic/6145152)
aren't available outside the enterprise---only users with access to the
enterprise's managed Google Play store can view and install private apps.

> [!NOTE]
> **Note:** Custom app publishing is designed for private apps that are used by a single enterprise customer or apps that contain sensitive data. If an app is intended for multiple enterprise customers and/or requires authentication to access any sensitive data, then consider [publishing the app to the public Google Play store](https://support.google.com/googleplay/android-developer/answer/113469).

## Preliminary setup

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:

1. Open the [Google API Console](https://console.cloud.google.com/). 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](https://support.google.com/googleapi/answer/6251787).

3. [Open the API Library](https://console.cloud.google.com/apis/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

With the same project for which you've enabled the Google Play Custom App Publishing API, follow these steps to create a service account:

1. Open the [Google API Console](https://console.cloud.google.com/). 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.

### Grant publishing permission to the service account

To grant publishing permission to the service account you've created, follow these steps:

1. Open the [Play Console](https://play.google.com/console)

2. Select an existing developer account or create a new one.

   > [!NOTE]
   > **Note:** Owner account of your developer account should also be an admin of the enterprise customer you wish to publish the private app to.

3. Follow the steps mentioned in [give users access](https://support.google.com/googleplay/android-developer/answer/9844686?ref_topic=7072535) document to give the permission to [create and publish private apps](https://support.google.com/googleplay/android-developer/answer/9844686?ref_topic=7072535#zippy=%2Ccreate-and-publish-private-apps-to-your-organization) to the service account's email address.

### 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:

```
https://play.google.com/console/developers/123456
```

You need to pass the developer account ID as a parameter when you
[publish private apps](https://developers.google.com/android/work/play/custom-app-api/publish) for the user's
enterprise.