Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8520549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:34:00+00:00 2026-06-11T06:34:00+00:00

The Story: I am making an Android app that allows a user to purchase

  • 0

The Story: I am making an Android app that allows a user to purchase a subscription, and does not require the user to have an account or login. I want to check whether or not a user has purchased a subscription, and the Google Play Android Developer API seems to provide this service.

The Problem (TL;DR): Should I use OAuth as a “web application”, “installed application”, “service application”, or none of the above?

The Problem: To get started with this, I am told:

Access to the Google Play Android Developer API is authenticated using
the OAuth 2.0 Web Server flow. Before you can use the API, you will
need to set up an APIs Console project, create a client ID and
generate a refresh token. -source

Fair enough. There are then setup instructions that go on to say:

On the second page, select web application and set the redirect URI
and Javascript origins.

My application does access the Internet, but it is an installed Android app, not a web application, so I don’t have a “redirect URI” or “Javascript origins” to link it to. Additionally, this would require a user to log in, which I do not want and is not necessary in my case (I just want to check whether or not the user has purchased a subscription).

So if instead of a “web application” I try to create an “installed application (Android)”, this still requires a user login, to be able to manage the user’s resources.

I do not want this. There is a third alternative called a “service account” that does not require a user login:

A Service Account is used when you have a service that wants to handle
its “own” resources (e.g., an App Engine app that manages Compute
Engine resources), as opposed to the resources of an external user
(e.g., the standard OAuth flow). Using a Service Account the app will
be the owner of the resources… If you use a Service Account, you will only get data about the service’s purchases. -source

I’m not sure if that is what I want in my case…

Finally, there is also this option:

The simplest flow is one where no end-user authorization is needed.
You still need to identify your client application using the API key. -source

This seems perfect! However, I was told initially that to use the Google Play Android Developer API I need to authenticate with OAuth 2.0, and this does not use a client ID which I was initially told that I specifically need.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:34:01+00:00Added an answer on June 11, 2026 at 6:34 am

    There are at least 2 problems with what you are trying to achieve here:

    1. As you would be handling the server response in your Android application, you would have something like this in your code:

      if (isSubscriptionValid())
      

      Somebody could tamper with your application’s APK on his device (which is very easy) and simply replace that check with:

      if (true)
      

      The attacker would then have access to your content without ever being subscribed.

    2. As calls to the API have to be authorized by your developer account and being personally logged in on each users device is obviously no option, you would have to go for Service Accounts, as you’ve already figured out correctly.

      These however are only meant for server-to-server interactions, as otherwise it would require you to store your private key on everybodys device and as it is not possible to store data securely on an Android device, you wouldn’t meet this requirement:

      The private key must be stored and managed securely.

    Google recommends you to have a backend server to do this kind of checks. So you can decide if a subscription is valid before handing over content to the client and other things:

    The API is designed to be used from your backend servers as a way of securely managing subscriptions, as well as extending and integrating subscriptions with other services.

    If you do not have a backend server available, you have to rely on In-app Billing Notifications.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making an Android app that tracks a user and displays their location in
I am making an android app that shows the Calendar day view, it looks
I'm making a function in my android app that, at a home screen the
I’m making an android app, which uses Google maps. One functionality is that the
I'm making an engine/CMS for story-based web browser games. I have quite a bit
Long story short, I'm making a custom Swing component that's basically a JTable with
Alright I am making an Android app, and using the CAPTURE_PIC_REQUEST to take a
What I have is an app that displays some documents. In the string resources
I am making an android application in which I have put 10 images and
Back story i have a table that stores cached times, and currently has about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.