python-3.xfirebasefirebase-app-distribution

Is there any way to download apps programatically from firebase app distribution?


My main goal is to programatically download an app that is being distributed to the testers from firebase app distribution. The effect should be the same as pressing "Download" button on specified release from app distribution here:enter image description here

I've tried using Firebase REST API but there only seems to be to be the endpoint for listing the releases for specified app and uploading a release, there is no download option.

I've also checked firebase which is supporting firebase storage, however you can add apps releases without having a storage so I assume it's not where they're being stored.

The download URL generated by "Download" button follows the pattern https://firebaseappdistribution.googleapis.com/app-binary-downloads/firebase-app-distro/app-binaries/[PROJECT_ID]/[APP_ID]/e4faf167-0e3d-4b1a-82dd-44811c0b5e43.apk?token=[TOKEN]. The part after [APP_ID] identifies the app but I wasn't able to find where does it come from.

Is it even possible to download an app in such fashion? Are there any other ways to download the app?


Solution

  • The public REST API can (now) be used to get the download URL. See binaryDownloadUri in the Release resource.

    You could list all releases for a given app_id (or pick the latest release using orderBy: createTime desc and pageSize: 1 to get the latest release).