Speakap Support

Setting up white-label app publishing for Android

Important: 
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 

Introduction

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 mobile-development@speakap.nl). 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.)

Overview

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

Main websites:

  • Google Play Developer Console - where you manage and submit your Android app
    https://play.google.com/apps/publish/
    Screen_Shot_2018-02-22_at_14.53.12.png 
  • Google APIs Console - where you create API keys for all kinds of Google projects
    (you'll get the link in one of the steps)
    Screen_Shot_2018-02-22_at_14.52.36.png

 

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)

Screen_Shot_2018-02-22_at_14.53.12.png

  1. Open the Google Play Console 
  2. Log in with the correct Google account (the one for publishing the app)
  3. Select All applications tab (in the menu on the left)
    Screen_Shot_2018-02-23_at_17.03.51.png
  4. Click the CREATE APPLICATION button (on the right)
    Screen_Shot_2018-02-23_at_17.05.28.png
  5. Select Default language and Title (these can be changed later)
  6. Click the CREATE button
    Screen_Shot_2018-02-23_at_17.04.39.png
  7. 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.

Overview:
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.

Screen_Shot_2018-02-22_at_14.53.12.png

  1. In the Google Play Console go to the Home page
  2. Click the Settings menu option
    Screen_Shot_2018-02-23_at_17.07.26.png
  3. Expand Developer account and click the API access button
    Screen_Shot_2018-02-23_at_17.08.10.png
  4. 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)
    Screen_Shot_2018-03-02_at_11.07.14.png
    B) If you see a Service Accounts section, you don't need to create a New Project. Next step.
    Screen_Shot_2018-03-02_at_11.08.30.png
  5. Click the Create Service Account button (in the Service Accounts section)
    Screen_Shot_2018-02-23_at_17.10.21.png
  6. Click on the Google API Console link in the dialog

    Screen_Shot_2018-02-02_at_09.21.19.jpg

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.

Tip:
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:

Screen_Shot_2018-02-23_at_11.04.10.png

 

Screen_Shot_2018-02-22_at_14.52.36.png

Go to the "Create service account" page:

  1. 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

    Screen_Shot_2018-10-02_at_17.16.48.png In menu: Screen_Shot_2018-02-23_at_11.29.27.png

  2. Click the Create Service account button
    The button may be located (depending on your account):

    Location 1: in the center of the screen
    Screen_Shot_2018-02-23_at_11.37.37.png

    Location 2: at the top of the page
    Screen_Shot_2018-02-23_at_11.35.51.png
     

Create service account and get JSON file:

  1. Provide a name for the service account, like: Speakap-automation, and click Create

    Screen_Shot_2018-10-02_at_17.25.10_2.png

  2. Select the Role - Service Account User (see steps below)
    1. Click Select a role
    2. Scroll down - the item we need is at the bottom
      (you can also type in the filter box)
    3. Click Service Accounts
    4. Click Service Account User

      Screen_Shot_2018-10-02_at_17.28.22_copy.png

      Screen_Shot_2018-10-02_at_17.27.59_copy.png

  3. Click Create key
  4. Select JSON as the Key type and click Create to close the dialog.
  5. download will start for a JSON file.
    Save the file and send it to support@speakap.com 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!

    Screen_Shot_2018-10-02_at_17.29.27_copy.png

  6. Click Done

Last steps

  1. Don't forget to Grant access (in the next step)
  2. 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).

Screen_Shot_2018-02-22_at_14.53.12.png

  1. Go back to the Google Play Console
  2. You should still be at the API Access page, as before
  3. Click Done to close the dialog (that you opened before)
  4. In the list Service Accounts find the account that you created and click GRANT ACCESS
    Speakap-app-submissions-step-15.png
    This will open a dialog:
    Screen_Shot_2018-02-23_at_14.03.13_3.png
    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.
  5. In the dialog: Leave the email field unchanged
  6. Set Access expiry date to Never
  7. Choosing Permissions
    You can see screenshots in step 5 later. First do this:
    1. Select the Role -> Release manager
    2. The appropriate permissions should now be selected automatically
    3. (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:
      1. In Add an app select your specific Speakap white-label app
      2. 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.
  8. 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.

Screen_Shot_2018-02-22_at_14.53.12.png

  1. Verify permissions in the Play Console
    Screenshots below
    1. 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). 
    2. (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.
    3. Screenshots:
      (Depending on which option you chose)
      1. Global permissions screenshot:
        Screen_Shot_2018-02-23_at_14.03.13_2.png

      2. Per-app permissions screenshot:
        Screen_Shot_2018-02-23_at_14.57.33_2.png

  2. Click Add user / Save to close the dialog
  3. You're done!

 

Finding the permissions later

Screen_Shot_2018-02-22_at_14.53.12.png
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:

  1. Go to Settings > Developer account > Users & permissions (in the menu on the left)
  2. Find the right account in the list
  3. Click the settings icon on the right, and then Change permissions. See the screenshot.
    Screen_Shot_2018-02-23_at_13.27.45.png

 

 

Checklist

 

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: 
mobile-development@speakap.nl
 

 

 

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.