Skip to content
Branch: master
Find file History
NilLlisterri Fix "Invalid value for versionCodes: [XXX]"
The version code was being sent as an array inside an array, raising the following error:
`<HttpError 400 when requesting returned "Invalid value for versionCodes: [100921]">`.
Removed the extra square brackets.
Latest commit 357e081 Jan 31, 2019

Google Play Developer Publishing API samples

A collection of command-line samples for the Play Developer Publishing API.


  1. Download Google APIs Client Library for Python (google-api-python-client):

or use pip:

$ pip install google-api-python-client
  1. Make sure you can import the client library:
$ python
>>> import apiclient

First request using OAuth2: Installed application

  1. Edit the client_secrets.json file and add the client ID and client secret.

  2. Execute any of the scripts to begin the auth flow:

$ python com.myapp.package

A browser window will open and ask you to login. Make sure the account has enough permissions in the Google Play Developer console.

  1. Accept the permissions dialog. The browser should display

The authentication flow has completed.

Close the window and go back to the shell.

  1. The script will output a list of apks.

  2. The tokens will be stored in androidpublisher.dat. Remove this file to restart the auth flow.

First request using OAuth2: Service accounts

  1. Edit and add the service account Email address.

  2. Copy the service account key file, generated in the Google APIs Console into the same directory and rename it to key.p12.

  3. Execute the script:

$ python com.myapp.package
  1. The script will output a list of apks.
You can’t perform that action at this time.