*Hi, we are trying to get Google Play subscription information connected to one of our Android applications. The first step is authorizes and gets subscriptions json.*
*Has anyone succeed to work with Google Play Developer API? Autorization? Subscriptions list?* *Below is our experience* *When I use authScope = "https://www.googleapis.com/auth/androidpublisher";* * (took it from Google Example)* * // private static final *String *authScope *= *"https://www.googleapis.com/auth/androidpublisher"*; am.getAuthToken(*myAccount*,*authScope*,options,*this*,*new * OnTokenAcquired(),*new *Handler(*new *OnError())); *private class **OnTokenAcquired **implements * *AccountManagerCallback<Bundle> { * *@Override **public void * *run(AccountManagerFuture<Bundle> accountManagerFuture) { * *try * *{ Bundle bundle = accountManagerFuture.getResult(); * *String token = bundle.getString(AccountManager.**KEY_AUTHTOKEN* *); } **catch * *( Exception ae ) { Log.e(**TAG**, **"OnTokenAcquired Exception=" * *+ ae.getMessage(), ae); } } }* *I can’t get the token, because I get exception below* OnTokenAcquired Exception=Unknown android.accounts.AuthenticatorException: Unknown at android.accounts.AccountManager.convertErrorToException(AccountManager.java:2213) at android.accounts.AccountManager.-wrap0(AccountManager.java) at android.accounts.AccountManager$AmsTask$Response.onError(AccountManager.java:2056) at android.accounts.IAccountManagerResponse$Stub.onTransact(IAccountManagerResponse.java:69) at android.os.Binder.execTransact(Binder.java:565) *When I use authScope = "Manage your tasks"; (took it from another Google Example)* *private static final **String **authScope **= **"Manage your tasks"* *; **I'm receiving token, but on **ProductPurchase product = purchases.products().get(**PACKAGE_NAME**, **TEST_SKU**, **token**).* *execute**();* *I am getting getProducts Exception=400 Bad Request* getProducts Exception=400 Bad Request { "code" : 400, "errors" : [ { "domain" : "global", "message" : "Invalid Value", "reason" : "invalid" } ], "message" : "Invalid Value" } com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 Bad Request { "code" : 400, "errors" : [ { "domain" : "global", "message" : "Invalid Value", "reason" : "invalid" } ], "message" : "Invalid Value" } at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:113) at com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:40) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse(AbstractGoogleClientRequest.java:321) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1065) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:419) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:352) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:469) -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/c25c6f49-a98e-4eec-8b1b-602d90b7f65e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
