After some researches i have managed to use AndroidPublisher api from google and am able to connect with google developer console from my web app in java. But it seems, since i don't have any google play accounts (do not have any app on play store) i cant get any thing from the android publisher api. I am just being able to connect the console. But my concern here is not to get information of any app that i have developed, but of any app that is already in play store. Currently i want to have reviews. So far i have tried this :
/** Global instance of the JSON factory. */
JsonFactory JSON_FACTORY = (JsonFactory) JacksonFactory.getDefaultInstance();
/** Global instance of the HTTP transport. */
HttpTransport HTTP_TRANSPORT = (HttpTransport) GoogleNetHttpTransport.newTrustedTransport();
GoogleCredential credential = GoogleCredential.fromStream(new FileInputStream("AppReviews-08a95e474894.json"))
.createScoped(Collections.singleton(AndroidPublisherScopes.ANDROIDPUBLISHER));
AndroidPublisher androidPublisher = new AndroidPublisher.Builder(HTTP_TRANSPORT, JSON_FACTORY ,credential).setApplicationName("Dream League Soccer").build();
AndroidPublisher.Reviews reviews = androidPublisher.reviews()
println "reviews --------------------= ${reviews.list("com.firsttouchgames.dls3").setMaxResults(500).execute()}"
When this executes, i get following exception:
Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "androidpublisher",
"message" : "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console.",
"reason" : "projectNotLinked"
} ],
"message" : "The project id used to call the Google Play Developer API has not been linked in the Google Play Developer Console."
}
I think this means, i do not have any google play accounts linked in my google developer console project/account.
So, do i need to have a google play account necessarily? Even if i have an account in google play, can i access the reviews of global apps (like i have used Dream League Soccer in above example with correct package name).
Please help, couldn't find any resource, or any answers on previously asked related questions. Please help!