Google api console android

Ваши идеи. Наши технологии. Для миллиардов пользователей

Масштабирование

Развивайте свой бизнес по всему миру, используя нашу платформу.

Итерации

Проводите эксперименты и тестирования, чтобы подготовить приложение для запуска и дальнейшего использования.

Статистика

Используйте детальную информацию и данные, имеющие практическое значение, чтобы принимать правильные решения.

Что нового в Google Play

Рассказываем новости с Саммита для разработчиков Android. Узнайте о новых функциях и инструментах, которые помогут вам добиться успеха на нашей платформе.

Создавайте качественные приложения и игры

Хотите добиться долгосрочного успеха? Повышайте производительность приложения и качество контента, а также улучшайте интерфейс и функции.

Отчеты о тестировании

Выявляйте проблемы, например со стабильностью и производительностью приложения, до того, как они коснутся пользователей.

Android Vitals

Отслеживайте и повышайте производительность своего приложения или игры.

Будьте уверены в своем продукте

Выбирайте подходящую стратегию и пользуйтесь инструментами, которые позволяют публиковать приложения, управлять ими и успешно выводить их на международный рынок.

Страница приложения

Совершенствуйте страницу приложения в Google Play, чтобы завоевать внимание пользователей.

Обзор выпусков

Отслеживайте сборки и управляйте выпусками на всех этапах.

Источник

Google Play Developer API

The Google Play Developer API allows you to perform a number of publishing and app-management tasks. It includes two components:

  • The Subscriptions and In-App Purchases API lets you manage in-app purchases and subscriptions.
  • The Publishing API lets you upload and publish apps, and perform other publishing-related tasks.

Subscriptions and In-App Purchases

You can use the Google Play Developer API to manage:

You can use these resources to check the status of purchases, and to modify and cancel recurring purchases.

To learn more about how to sell subscriptions in an Android app, read Google Play In-app Billing on the Android Developers site.

Publishing API

The Google Play Developer Publishing API allows you to automate frequent tasks having to do with app production and distribution. This provides functions similar to those available to a developer through the Play Console, such as:

  • Uploading new versions of an app
  • Releasing apps, by assigning APKs to various Tracks (alpha, beta, staged rollout, or production)
  • Creating and modifying Google Play Store listings, including localized text and graphics and multi-device screenshots

Those tasks are performed using the new edits functionality, which take a transactional approach to making changes; you bundle several changes into a single draft edit, then commit the changes all at once. (None of the changes take effect until the edit is committed.)

Getting Started

To start using the Google Play Developer API, have a look at the Getting Started page.

There are Java and Python libraries you can use to manage interaction with the Publishing API. We have provided code samples on the Client Libraries and Code Samples page. If you are using other languages, you can access the REST APIs directly via HTTP.

If you’re having issues using the Google Play Developer API, we’re here to help.

Other APIs

The Google Play Games Services Publishing API allows you to automate frequent tasks having to do with game services production and distribution.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Источник

Access Google APIs

When you want to make a call to one of the APIs in an SDK that’s powered by Google Play services, such as Google Sign-in or ML Kit, you need to first create an instance of an API client object. These objects automatically manage the connection to Google Play services. When a connection is available, each API client object executes requests in order. Otherwise, the client object queues the requests. Unless documentation indicates otherwise, client objects are cheap to construct; it’s fine to make new API clients every time you want to invoke API methods.

This guide shows how you can make API calls to any of the SDKs that are powered by Google Play services, including how to access the services that don’t require authorization and those that require authorization.

Читайте также:  Очистка памяти андроид miui

Get started

To get started, add the necessary tools and dependencies in your app project, as described in the guide on how to set up Google Play services.

Access when authorization isn’t required

To access a service that doesn’t require API authorization, get an instance of the service’s client object, passing it either the current Context or the current Activity . Before any API calls are executed, users are prompted to upgrade Google Play services if necessary.

For example, to get the device’s last known location using the Fused Location Provider for Android, add the logic that’s shown in the following code snippet:

Kotlin

Access when authorization is required

To access a service that requires user authorization, complete the following steps:

  1. Sign the user in.
  2. Request permission to access the scopes that the service requires.
  3. Get an instance of the service’s client object, passing it the user’s GoogleSignInAccount object in addition to a Context or Activity object.

The following example implements reading a user’s daily steps using the Google Fit API. To view a similar implementation in the context of a full project, view the main activity of the BasicHistoryApiKotlin app on GitHub.

Kotlin

Check for API availability

Before you enable a feature in your app that depends on a Google Play services API, include a check for the availability of the API on the device. To do so, call checkApiAvailability() .

The following code snippet demonstrates how to check for the availability of the fused location provider.

Kotlin

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Источник

How to configure API access to Google Play Console

Log in to the Google Play Console normally requires your Google Account or your login credentials. But if you like to grant access to certain third-party applications, another way is required to provide the requested data. A third-party application which allows data analysis or automation like the App Store Manager, access the Google Play Console through various APIs. But without providing access rights and access permission, no connection is allowed.
The following article describes the required steps to configure API access by creating a new service account to a selected app for a third-party application. Basically, two main steps (with some actions) have to be performed.

  1. Create a new service account with int the Google Cloud Console
  2. Set permission within the Google Play Console

Follow these step-by-step instructions, because sometimes you can get lost in these user interfaces.

The Google Play Console

Google redesigned its Play Console only a few weeks ago. It is still not easy to navigate and to find every required information. For instance, Release Management is a kind of its own science. On the first screen, you likely will see your available apps. You can pin the more important ones to the top. We like to provide API access to one of our demo-apps.

Developer Account/ API access

On the left navigation bar, navigate to “Settings/ Developer account/ API access”. On this screen, you’ll find – if you already have done so – your configured service accounts.
Here you can adjust the permission on service account has on a global level (all apps) or per app.

Create new service account

Select “Create new service account”. A pop-up will show with a short description. New service accounts will be created within the Google Cloud Platform. There, we will create our JSON or P12 file as well, which is the key to our third-party apps. Therefore click on the blue “Google Cloud Platform” link.

Google Cloud Platform

The Google Cloud Platform is the one place, where you can configure various Google cloud services, their APIs and their access rights.

Google Cloud Platform, offered by Google, is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products, such as Google Search, Gmail, file storage, and YouTube.

Navigate to “IAM & Admin” and there to “Service Accounts”, if this view is not already open. The title should show “Service accounts for project Google Play Android Developer”.
Here you’ll see other service accounts if you already have some in place. If you have lost your key file ( you shouldn’t) you can create a new one here.

Create service account

Select “Create new service account” on the top. A form will guide you through the next steps. Provide a service account name. Add something which could be remembered. For instance the name for the service you are providing access for. Leave the ID as is and give a good remarkable description.

Set role

In the second step, choose a role. The role determines a certain access right. We will change it later, to the required ones. Choose “Project/ Editor” or something with fewer access rights. Click on done and you have successfully created a new service account.

Create key

Your new account shows up in the list as your first service account or between already existing ones. Validate the name and the description. On the far right, you see the thee three action dots. Click on them and select “Create key”.

Читайте также:  Хранилище ватсап андроид как достать

Create JSON or P12 key

Key type

A modal shows up and provides two options, two key types. The JSON format or the P12 format. At this stage, you should know which key is required for your third-party application access.
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It will contain some encrypted strings, among other information.
The P12 format is a binary archive file format for storing many cryptography objects as a single file.

Download key

In our example, we create a JSON key file and download it to our hard drive. Take the file and store it somewhere safe. We will require this file within our third-party application.
When you are done, close this tab or window and navigate back to the Google Play Console.

Service account overview

Click on “done” and you find the previously created service account within the service accounts list. If required press “F5” for a browser refresh or reload the page in a different way.
Choose “Grant access” in the middle of the line which belongs to the created service account. Now it is time to configure API access or respectively permissions on individual apps.

App permissions

Navigate to the first tab “App permissions”. Here you choose one or more apps for which the service accounts get access. Select only the required ones. Press “Apply”. A modal will show up and allow you to modify some permissions but not all of them. This is because we have to modify the global service account permission first. Close the modal and navigate to “Account permissions”.

Remove permissions

It is a good idea to remove all global permissions and to set the service account access rights for each app individually. This way no unwanted authorizations creep in.
Remove all checkboxes and switch back to the “App permissions” tab.

Set access permissions

Once again select the app for which you want to assign rights. In our example, we only select “Manage store presence”. The “View app information” is selected by default. Press “Apply” to accept the settings.

Provide the result

Use the created key file (JSON or P12) within your desired application. Sometimes you have to upload the whole file, in the case of our example, the App Store Manager, you provide only the content of the JSON file. Therefore open the file within your preferred editor (Notepad++, UltraEdit, or your standard OS editor) and copy the whole content with all brackets. By adding the JSON string we have successfully configure API access for the App Store Manager.

Configure API access to Google Play – conclusion

A few important notes on the storage and management of the service accounts and key files:

  • Don’t provide more access rights than required
  • Delete unneeded service accounts
  • Don’t forget to remove access to applications you don’t require any more
  • If you have “lost” a key file, remove the service account, and configure a new one

We have established third-party access to the Google Play Console and configured the required access rights. The mechanism itself is actually not complicated once you have done it a couple of times.
And for those who rarely have to do it and like to forget it, they can always look it up again here 😉

Источник

Getting Started

To start making API calls, you’ll set up and manage the Google Play Developer API directly from the Google Play Console. The API can only be managed by the owner of your Google Play Developer Account. The following instructions explain how to:

  • Set up a new or existing Google Cloud Project
  • Manage OAuth clients
  • Use a service account to access the Google Play Developer API
  • Access specialized APIs for analyzing your app

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

Creating a new project

  1. Go to the API access page on the Google Play Console.
  2. Accept the Terms of Service.
  3. Click Create new project.

The Google Cloud Project is automatically generated and linked to your Google Play Console.

Using an existing project

If you are already a user of the Google Play Developer API, you can link to your existing API project by following these steps:

  1. Go to the API access page on the Google Play Console.
  2. Accept the API Terms of Service.

Choose the project you’d like to link.

If your project isn’t listed, verify that

  • your Google Play Console account is designated as an Owner
  • Google Play Developer API is enabled for the project

Click Link existing project.

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 to 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

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

Follow the instructions on the page to create your service account.

During the process of account creation you need to grant your service account the role of Service Account User in order for it to appear in Google Play Console.

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 will be listed.

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.

Using OAuth clients

You can allow users to perform actions via 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. Learn more

  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 any more.

To create OAuth client via 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.

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 will be 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.

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

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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Источник

Читайте также:  Android java main class
Оцените статью