Getting Started

Before you can start making API calls, you need to set up API access to your Google Play Developer Account. This involves changes in both the Google Play Console and Google Cloud Console. The following instructions explain the four steps needed to start using the Google Play Developer API.

  1. Link your developer account to a new or existing Google Cloud Project.
  2. Enable the Google Play Developer API for your linked Google Cloud Project.
  3. Authorize an API key for the Google Play Developer API in your linked Google Cloud Project.
  4. Set up a service account with appropriate Google Play Console permissions to access the Google Play Developer API.

Link your account and project

Before you can access the Google Play Developer API, you must link your Google Play Developer Account to a Google Cloud Project. In most cases, we recommend that you create a new Google Cloud Project dedicated to your Google Play Developer Account, but you can link an existing project. Keep in mind that each Google Play Developer Account can only be linked to a single Google Cloud Project. If you have multiple apps in the same Google Play Developer Account, they all must share the same Google Cloud Project.

Create a new project

  1. Go to the API access page on the Google Play Console.
  2. Click Create new project.

The Google Cloud Project is automatically created and linked to your Google Play Developer Account.

Use an existing project

If you are already a user of the Google Cloud Console, you can link to your existing Google Cloud Project by following these steps:

  1. Go to the API access page on the Google Play Console.
  2. Choose the project you’d like to link. If your project isn't listed, verify that your user account is designated as Owner in the Google Cloud Project you want to link.
  3. Click Link existing project.

Enable the API

Once you have set up the linked Google Cloud Project, you need to enable the Google Play Developer API for this project. To do this, you need to be an owner of the Google Cloud Project.

  1. Go to the API access page on the Google Play Console.
  2. Under APIs, find the Google Play Developer API and click Turn on.

This directly updates the Google Cloud Project and the change takes effect immediately.

Authorize an API key

To use the API, you need an API key in your linked Google Cloud Project that is authorized to use the Google Play Developer API. Set this up in the Google Play Console.

Configure OAuth and Service Accounts

You need to configure access to the Google Play Developer API with an OAuth client or a service account. In most cases, you should use a service account to access the API.

Service accounts must be used in a secure environment, such as your server. The service account credentials need to be securely managed so they are not revealed to anyone that is not authorized to use the API.

The OAuth Client ID should be used if you need to access the API on behalf of an individual user. For example, if your website needs to access the Google Play Developer API from the web client on behalf of the user, you can use the Client ID. The user will be authenticated with their Google account instead of the service account. This allows you to make API calls on behalf of a user without compromising service account credentials.

  • Service account: A secure software service will access the API (most common)
  • OAuth clients: A user will access the API

Use a service account

You can create a service account from the Google Play Console.

  1. Go to the API access page on the Google Play Console.
  2. Under Service accounts, click Create new service account.
  3. Follow the instructions to create your service account.

    During the process of account creation you need to grant your service account access to the Google Cloud Project in order for it to appear in the Google Play Console.

  4. Once you’ve created the service account on the Google Play Console, click Done. The Service Accounts section of the API access page automatically refreshes, and your service account is listed.

  5. Click Grant Access to provide the service account the necessary rights to perform actions.

    To use the Google Play Billing APIs, you must grant the following permissions:

    • View financial data, orders, and cancellation survey responses
    • Manage orders and subscriptions

At this point, you should be able to access the Google Play Developer API through the service account. For more information, see Using OAuth 2.0 for Server to Server Applications.

Use OAuth clients

You can allow users to perform actions using the API under their own credentials using an OAuth client. A user’s actions are limited to those permitted via the Users and permissions page on the Google Play Console.

Before creating OAuth clients, you need to configure branding information for your product. For more information, see Setting up your OAuth consent screen.

  1. Go to the API access page on the Google Play Console.
  2. Under OAuth Clients, click Configure OAuth consent screen.
  3. Configure your product’s branding information.
  4. Once you’ve finished, click Refresh OAuth consent. The section updates and you won’t see the message about branding information anymore.

To create an OAuth client using Google Play Console:

  1. Go to the API access page on the Google Play Console.
  2. Under OAuth Clients, click Create new OAuth client.
  3. Follow the instructions on the page to create your OAuth client.
  4. Once you’ve created the OAuth client on the Google Play Console, click Done. The OAuth Clients section of the API access page automatically refreshes, and your OAuth client is listed.

    Sometimes the new OAuth client won’t appear on the page right away. In that case, click Refresh OAuth clients.

The details of your new OAuth client are displayed in a list on this page.

Additional information

Use the following tips and tricks to help you get started with API usage on Google Play.

Obtain your Developer ID

Some APIs require you to provide a Google Play Console Developer ID. This is a long number that was assigned when your Google Play Developer Account was created. Your Developer ID can be found in the URL of almost any page on the Google Play Console, such as the API access page.

For example, consider the Google Play Console URL:

https://play.google.com/console/developers/1234567890123456789/api-access

In the URL above, the Developer ID would be 1234567890123456789.

Note: If an app is transferred from one Google Play Developer Account to another, the Developer ID associated with that app will change. This means that after the transfer completes, you must use the Developer ID for the new Google Play Developer Account account in API calls for that app.

Specialized APIs

The Google Play Developer API contains several specialized APIs that allow you to perform specific types of analysis on your app:

Reply to Reviews API
Allows you to view user feedback for your app and reply to this feedback.
Voided Purchases API
Allows you to revoke access to in-app products associated with purchases that a user has voided.

Client libraries

We have provided client libraries you can use to programmatically access the REST APIs. For more information, see Client Libraries and Code Samples.