Reputation: 373
I am trying to upload a custom app to play store. I am stuck with how to get the account Id that I need to pass to the create method.
the documentation says that I need to call the following api but, I am not sure how to make the call and get service account.
I appreciate any help, thanks.
Here is my code so far:
GoogleCredential credential = GoogleCredential.fromStream(new FileInputStream("/Users/mie/Downloads/Google-Play-Android-Developer-9b6977dc98fc.json"))
.createScoped(Collections.singleton(PlaycustomappScopes.ANDROIDPUBLISHER));
Playcustomapp app = new Playcustomapp.Builder(httpTransport, JSON_FACTORY, credential).setApplicationName(APPLICATION_NAME).build();
app.accounts().customApps().create(...);
Upvotes: 2
Views: 1356
Reputation: 1572
You probably were referring to this documentation. It says that you have to create a service account manually and that it has to belong to a Cloud Project. Here are the steps:
Open the Google API Console. Login if prompted.
From the projects list, choose the project that you selected or created when enabling the API.
From the main menu, select IAM & Admin > Service accounts > Create service account.
Enter a name for your service account and select Furnish a new private key. Then click Create.
Once you followed this steps the service account email will look like this: [email protected]
. You should put it into the URL you mentioned along with the URL the visitor should be redirected to after. Like this:
I also advise to review the documentation once again.
Upvotes: 2