title: Android subscription and Google API
body: <p>I'm trying to use the new Android subscription system from Google Play into my application (I already had in-app billing working fine). I have successfully done the subscription billing, but I now want to retrieve informations about this subscription by using the google apis as indicated in the android documentation (http://developer.android.com/guide/market/billing/billing_subscriptions.html).</p>
  
  <p>I want my service to be able to do the API call to retrieve these informations, but I have problems with authentication (with oauth2). So far, this is what I do (in my php service) :</p>
  
  <pre><code>require_once 'google-api-php-client/src/apiClient.php'
  
  const SERVICE_ACCOUNT_NAME = 'email from services account access';
  $key = 'content of my private key retrieved from services account access';    
  
  $client = new apiClient();
  $cred = new apiAssertionCredentials(SERVICE_ACCOUNT_NAME, array('https://www.googleapis.com/auth/androidpublisher'), $key);
  $assertion = $cred-&gt;generateAssertion(); // This generate my encrypted JWT
  </code></pre>
  
  <p>I then try to retrieve the access token with this JWT object. The problem is that when I use the access token given I got the error that the developer account does not own the application, which is not true.</p>
  
  <p>(I know this is not the way to do it, but I just wanted to retrieve the access_token using the JWT to understand why it is not working, if I do it as indicated in the google apis documentation it is not working too).</p>
  
  <p>I need to do this API call from a server, so no end-user has to be involved (no manual consent).</p>