I have several packages in Google Play Store and deploy and publish the packages in bundles .abb format. I set the store to replace the signature of apps. We need to test applications with the final signature and sideload them to the device therefore we need apks and must download generated apks from the signed bundle from the google play store.
Google Play Store Console Download link lication
We have an automation mechanism CI/CD and use Google API, the last step of this automation which is downloading the signed APK does not work!!!
This is the ref link https://developers.google.com/android-publisher/download-apks
Authentication scope https://www.googleapis.com/auth/androidpublisher
DownloadId extraction https://developers.google.com/android-publisher/api-ref/rest/v3/generatedapks/list I need generatedUniversalApk
Template API request
Example of API request
curl
--request GET 'https://androidpublisher.googleapis.com/androidpublisher/v3/applications/com.example.testapp/generatedApks/1234/downloads/MTszMjoyODpBRTo0RTpCRTozRjo4QjpBQjowRTpENTpGOTo2QjoxQzo5NjTRFgyhujrtVG6pBMjpFMDo0Qjo4Qzo1Qjo4MDo3refgGdFGrtyGFjoyNjpDRjoxNzpEMTtzcGxpdDsyO2Jhc2U=:download'
--header 'Authorization: Bearer ya29.c.b0AXv0zTPOHZXZLLV0HORNx6Ph_i0I5BSYGqHF55cB0g4t7SxlxlZvuiM0H6Ul8Wxu0a5YUcQBlrbV34MO3J65bvHHTYKfCNzQpqgnDGZ4Ag2apChnqmIKQEXslUnpVQWrtfghjdeZFbouN3ASJ2kdIBvK0N3_7ZApmuIyYs7E6DaJ8m6i94IznUbtSD8IGXVyMzhrYTRgFlCfoZhNvTjK0RjcY7Vp-qw
Issue It returns 204 and no download!!! I can download the signed APK from Google Play Console.
It is another relevant question in the StackOverflow How to automate download Google signed universal APK to distribute outside Google Play?
You need to use an URL parameter alt=media, then the response includes the file contents in the response body.
Reference linked: https://developers.google.com/drive/api/v3/reference/files/get
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.