3

To my understanding, the main difference is that a service account doesn't require a user to log in for authorization, while an installed application does.

I am making an Android app (an "installed application"?) that offers an in-app subscription, and doesn't require the user to log in to an account (a "service account"?). All that I want to do is to check whether or not the user has purchased a subscription. To get a Client ID for the Google Play Developer API, I have to declare it as either an installed application or a service account, and am unsure which to go with.

Kalina
  • 5,504
  • 16
  • 64
  • 101

1 Answers1

4

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, and no user will have to be involved -- they're not the user's resources, so why would they be?

An Installed Application is pretty straightforward -- it's an app installed by the user to manage the user's resources. If your app is managing a user's resources, you will need to ask their permission. There's no way around that.

Jason Hall
  • 20,632
  • 4
  • 50
  • 57
  • Makes sense! What I'm trying to use this for is checking whether or not the user has purchased a subscription. So I should use a service account, right? – Kalina Sep 11 '12 at 00:14
  • If you use a Service Account, you will only get data about the service's purchases. I'm not an expert on this API, maybe someone else will chime in. You may have luck using Google Play Services to prompt the user for access to this data? – Jason Hall Sep 11 '12 at 01:22
  • 1
    Actually reading the docs it sounds like it may expect _your_ access token (the developer). Not to prompt a user for their permission. – Jason Hall Sep 11 '12 at 01:24
  • That's what it seems like to me too, but it's still not very clear... I suppose it should be a service account after all, then – Kalina Sep 11 '12 at 13:31