Authorization  |  Google Play Developer API  |  Google for Developers (2024)

Stay organized with collections Save and categorize content based on your preferences.

This section contains instructions specific to the Google Play Developer API. See thefull OAuth2 documentationfor more details.

Initial configuration

Access to the Google Play Android Developer API is authenticated using theOAuth 2.0 Web Serverflow. Before you can use the API, you will need to set up an APIs Consoleproject, create a client ID and generate a refresh token.

Creating an APIs Console project

  1. Go to the APIs Console and log inwith your Google Play Console account.
  2. Select Create project.
  3. Go to Services in the left-hand navigation panel.
  4. Turn the Google Play Android Developer API on.
  5. Accept the Terms of Service.
  6. Go to API Access in the left-hand navigation panel.
  7. Select Create an OAuth 2.0 client ID.
    • On the first page, you will need to fill in the product name, but a logois not required. Note that your end users will not see the product name.
    • On the second page, select web application and set the redirect URI andJavascript origins. Both of these settings can be changed later.
  8. Select Create client ID.

Generating a refresh token

  1. While logged in with your Google Play Console account, go to thefollowing URI:
    https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/androidpublisher&response_type=code&access_type=offline&redirect_uri=...&client_id=...
  2. Select Allow access when prompted.
  3. The browser will be redirected to your redirect URI with a codeparameter, which will look similar to 4/eWdxD7b-YSQ5CNNb-c2iI83KQx19.wp6198ti5Zc7dJ3UXOl0T3aRLxQmbwI.
  4. Exchange this code for an access and refresh token pair by sending a POSTrequest to https://accounts.google.com/o/oauth2/token with thefollowing fields set:
    grant_type=authorization_codecode=<the code from the previous step>client_id=<the client ID token created in the APIs Console>client_secret=<the client secret corresponding to the client ID>redirect_uri=<the URI registered with the client ID>
    A successful response will contain your tokens in JSON format:
    { "access_token" : "ya29.ZStBkRnGyZ2mUYOLgls7QVBxOg82XhBCFo8UIT5gM", "token_type" : "Bearer", "expires_in" : 3600, "refresh_token" : "1/zaaHNytlC3SEBX7F2cfrHcqJEa3KoAHYeXES6nmho"}

Accessing the API

Once you have generated the client credentials and refresh token, your serverscan access the API without an active login or human intervention.

Using the access token

Servers can make calls to the API by passing the access token in theAuthorization header of the request:

Authorization: Bearer oauth2-token

Using the refresh token

Each access token is only valid for a short time. Once the current access tokenexpires, the server will need to use the refresh token to get a new one. To dothis, send a POST request to https://accounts.google.com/o/oauth2/token withthe following fields set:

grant_type=refresh_tokenclient_id=<the client ID token created in the APIs Console>client_secret=<the client secret corresponding to the client ID>refresh_token=<the refresh token from the previous step>

A successful response will contain another access token:

{ "access_token" : "ya29.AHES3ZQ_MbZCwac9TBWIbjW5ilJkXvLTeSl530Na2", "token_type" : "Bearer", "expires_in" : 3600,}

The refresh token thus allows a web server continual access to the API withoutrequiring an active login to a Google account.

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.

Last updated 2024-08-21 UTC.

Authorization  |  Google Play Developer API  |  Google for Developers (2024)
Top Articles
Best penny stocks of March 2024
Making sense of Bitcoin, Cryptocurrency, and Blockchain
The Largest Banks - ​​How to Transfer Money With Only Card Number and CVV (2024)
123 Movies Black Adam
Loves Employee Pay Stub
CLI Book 3: Cisco Secure Firewall ASA VPN CLI Configuration Guide, 9.22 - General VPN Parameters [Cisco Secure Firewall ASA]
Rek Funerals
Seething Storm 5E
Miles City Montana Craigslist
Palace Pizza Joplin
House Share: What we learned living with strangers
83600 Block Of 11Th Street East Palmdale Ca
[PDF] INFORMATION BROCHURE - Free Download PDF
Find The Eagle Hunter High To The East
Phillies Espn Schedule
Culvers Tartar Sauce
Lonadine
Busted Newspaper S Randolph County Dirt The Press As Pawns
Craigslist Motorcycles Orange County Ca
Bowlero (BOWL) Earnings Date and Reports 2024
Christina Khalil Forum
Baywatch 2017 123Movies
Northern Whooping Crane Festival highlights conservation and collaboration in Fort Smith, N.W.T. | CBC News
Grab this ice cream maker while it's discounted in Walmart's sale | Digital Trends
Log in or sign up to view
Kp Nurse Scholars
Metro Pcs.near Me
2013 Ford Fusion Serpentine Belt Diagram
Marion City Wide Garage Sale 2023
Www.patientnotebook/Atic
Airtable Concatenate
Olivia Maeday
Star Wars Armada Wikia
Phoenixdabarbie
Hwy 57 Nursery Michie Tn
Flaky Fish Meat Rdr2
Orange Pill 44 291
Tra.mypatients Folio
Mgm Virtual Roster Login
Federal Student Aid
Umiami Sorority Rankings
Austin Automotive Buda
Finland’s Satanic Warmaster’s Werwolf Discusses His Projects
Bismarck Mandan Mugshots
Saline Inmate Roster
Levi Ackerman Tattoo Ideas
Thothd Download
Copd Active Learning Template
Benjamin Franklin - Printer, Junto, Experiments on Electricity
Craigslist.raleigh
Used Curio Cabinets For Sale Near Me
Blippi Park Carlsbad
Latest Posts
Article information

Author: Jamar Nader

Last Updated:

Views: 5825

Rating: 4.4 / 5 (55 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Jamar Nader

Birthday: 1995-02-28

Address: Apt. 536 6162 Reichel Greens, Port Zackaryside, CT 22682-9804

Phone: +9958384818317

Job: IT Representative

Hobby: Scrapbooking, Hiking, Hunting, Kite flying, Blacksmithing, Video gaming, Foraging

Introduction: My name is Jamar Nader, I am a fine, shiny, colorful, bright, nice, perfect, curious person who loves writing and wants to share my knowledge and understanding with you.