Setting up white-label app publishing for Android
Doing any step wrong (or skipping a step) will result in a non-working API key. Follow the steps carefully to avoid having to do the whole procedure again.
Note: We recommend following this guide. However, if you prefer to see it in a glance, check:
Brief guide: https://speakap.zendesk.com/hc/en-us/articles/360009934314
Publishing regular updates of your app is an automated process. This requires us to have API access to your Google Play account. Apart from that, we also need developer account access.
- API access - Described in this guide.
- Developer account access (for the email email@example.com). We recommend giving it the Administrator role, for ease. - Described in another guide.
(Following this procedure will allow Speakap to publish your white-label app quickly and securely. This will ensure that your organization is always using the latest version of the application, with all the new features and bug fixes.)
Main goals: (don't start now)
- Create an app in the Play Console
- Create service account in API Console
- Send the JSON file to us (it contains the API key)
- Give permissions to the API key in the Play Console
- Google Play Developer Console - where you manage and submit your Android app
- Google APIs Console - where you create API keys for all kinds of Google projects
(you'll get the link in one of the steps)
Step 1: Create empty Application
You will need an application later on. We'll make an API key and allow it to access this application.
The actual Android app will later be published inside this empty application.
(you can skip this step if you've already created the correct application)
- Open the Google Play Console
- Log in with the correct Google account (the one for publishing the app)
- Select All applications tab (in the menu on the left)
- Click the CREATE APPLICATION button (on the right)
- Select Default language and Title (these can be changed later)
- Click the CREATE button
- Leave the application empty.
Your application has been created. Now let's allow an API key to access it.
Step 2: Create Service Account (Play Console part)
This is needed for automated access to the account. Service accounts allow access to the Google Play Developer Publishing API on behalf of an application rather than an end user.
In Step 2 will will start creating the account in the Play Console.
Then in Step 3 we will complete its creation in the API console.
Finally, we will go back to the Play Console to do the final steps.
- In the Google Play Console go to the Home page
- Click the Settings menu option
- Expand Developer account and click the API access button
- A) If you see a button to Create New Project, click it
(you will see it if API access is not currently enabled for this account)
B) If you see a Service Accounts section, you don't need to create a New Project. Next step.
- Click the Create Service Account button (in the Service Accounts section)
- Click on the Google API Console link in the dialog
These steps should create an API project and take you to the Google APIs Console.
(it's located at https://console.developers.google.com/apis/ )
Step 3: Create Service Account (APIs Console part)
The APIs Console is where you manage your API keys.
Usually you don't need to change the project name. It should be automatically selected.
In case you have more than one project (unlikely), you can check which one is selected at the top (see screenshot).
Normally you should just leave it as it is:
Go to the "Create service account" page:
- You need to be on the page Service Accounts
Or if you're not there, open the menu and go to: IAM & admin -> Service accounts
- Click the Create Service account button
The button may be located (depending on your account):
Location 1: in the center of the screen
Location 2: at the top of the page
Create service account and get JSON file:
- Provide a name for the service account, like: Speakap-automation, and click Create
- Select the Role - Service Account User (see steps below)
- Click Select a role
- Scroll down - the item we need is at the bottom
(you can also type in the filter box)
- Click Service Accounts
- Click Service Account User
- Click Create key
- Select JSON as the Key type and click Create to close the dialog.
- A download will start for a JSON file.
Save the file and send it to firstname.lastname@example.org or fill in the contact form. Mention your company name and white-label app name.
This JSON file contains the API key. Anyone who has it could gain access to your account, so keep the file secure!
- Click Done
- Don't forget to Grant access (in the next step)
- You may now close the Google APIs Console window and go back to the Play Console
Step 4: Grant access
Having the JSON API key file is not enough in order to gain access.
You need to Grant Access to the API key for your application (the one created in Step 1).
- Go back to the Google Play Console
- You should still be at the API Access page, as before
- Click Done to close the dialog (that you opened before)
- In the list Service Accounts find the account that you created and click GRANT ACCESS
This will open a dialog:
Note: If you want to verify/modify the permissions later, you can do this in the Users & permissions page (see Step 5). Don't do this now.
- In the dialog: Leave the email field unchanged
- Set Access expiry date to Never
- Choosing Permissions
You can see screenshots in step 5 later. First do this:
- Select the Role -> Release manager
- The appropriate permissions should now be selected automatically
- (optional) Per-app permissions
If you skip this step we will have global permissions. This will give us rights to release apps for your whole account. If you have only one application, this should be a good option.
In case you have other apps that are not related to Speakap, you may want to restrict our access. Add the Speakap app(s) to the list:
- In Add an app select your specific Speakap white-label app
- If you have multiple Speakap apps, add all of them here. This way we can use the same API key for all of you Speakap apps.
- Wait! Do Step 5 below before you click Add user. See "Verify permissions" below.
Step 5: Verify permissions
It's important to make sure all necessary permissions are enabled.
- Verify permissions in the Play Console
- The following 6 permissions must be enabled, at least:
- View app information
- Create & edit draft apps
- Manage production releases
- Manage alpha & beta releases
- Manage alpha and beta test configuration
- Edit store listing, pricing & distribution
NB: If you previously decided to add multiple Speakap apps here, make sure that all of them have these 6 permissions (at least).
- (optional) Remove unnecessary permissions
The Release manager role gives more permissions than we need. If you want to restrict our access as much as possible, enable only the permissions mentioned above, and uncheck everything else.
(Depending on which option you chose)
- Global permissions screenshot:
- Per-app permissions screenshot:
- Global permissions screenshot:
- Click Add user / Save to close the dialog
- You're done!
Finding the permissions later
If you just completed the guide, you can skip this step.
In case of problems with the API key (we try it and it does not work), the first thing to check is the permissions. You can find the permissions later here:
- Go to Settings > Developer account > Users & permissions (in the menu on the left)
- Find the right account in the list
- Click the settings icon on the right, and then Change permissions. See the screenshot.
Testing the API key - by Speakap
Testing helps if you want a quick confirmation whether you completed this guide successfully.
Soon after we receive the API key from you we can test whether it has been set up correctly. Up to some extent.
- We can easily test whether things work with steps 1-3 (Service Account, key, API project). We do this by directly testing the API key that you sent us.
- However, it may be difficult to verify whether you gave the right permissions in steps 4-5. In some cases it can take a few days. We may be able to verify the permissions only after we build the app and upload it.
This depends on whether you've given the Administrator role to our account (email). More specifically, the "Manage user permissions" permission. If you've decided to give fewer permissions to our account (email), we won't be able to see/change the access rights of the API key. So then you'll have to verify them yourself in case of trouble.
Therefore, we recommend giving the Administrator role to our account:
If you've seen any inconsistencies in this article, please let us know! We need to update it every time Google make changes the pages. We'll be happy to help.