This project contains an unofficial API for google play interactions. The code mainly comes from GooglePlayAPI project which is not maintained anymore. The code was updated with some important changes:
- ac2dm authentication with checkin and device info upload
- updated search and download calls
- select the device you want to fake from a list of pre-defined values (check
device.properties
) (defaults to a OnePlus One)
You can see the usage in the scripts directory.
docker build -t googleplay_api .
cd ~/googleplay-api
docker run -it -v ./scripts/:/scripts -v ./config/:/config -v ./info/:/info googleplay_api:latest
I like to have different folders for each purpose so I can change everything dynamically.
- scripts: That contains scripts
- config: That contains the configuration for the login
- info: That contains files that have the output of the scripts
First create a directory called "config" and then create a file called login.json with the following information
{
"test_device": {
"username": "<google_email_account>",
"password": "<app_password>",
"deviceName": "<codename_device>",
"gsfId" : <gsf_id>
}
}
To create password first add two factor authentication to the google account. Then create a application password in the button below two factor authentication in the google account.
There is a list of device names in /gpapi/device.properties, choose one and then add the codename, for "Nexus 5 (api 27)" the code name is "hammerhead"
To get this value go to "gpapi"->"device.properties" file. In the case of the deviceName "hammerhead", search for the GSF.version and you will find 12688048.
docker rmi -f $(docker images -aq)
docker container prune
docker volume prune
gpapi.googleplay.RequestError: 'Error retrieving information from server. DF-DFERH-01'
- NoMore201#105
- It may mean that we need to refresh the gsfid and auth_sub_token by generating another app token in the Google Account under the "securit" tab.
- "two-factor authentication"->"Apps Passwords"