I'd like to ask, if it is possible to download a apk or ipa file using Hockey Api?
I can get the download_url per app_versions api. But that url gives me a html web page as response.
Is there any way to download the App with cUrl and co.
Thanks!
I got this to work by adding ?format=apk to the end of the download_url value retrieved via the HockeyApp API.
Note that I also had to update the first part of the URL from https://rink.hockeyapp.net/apps/ to https://rink.hockeyapp.net/api/2/apps/.
The info I got from HockeyApp:
This is possible by sending the following request:
GET /api/2/apps/APP_ID/app_versions?include_build_urls=true
You need to authorize with your API token and the API token needs to be owned by a developer of the app. The direct download URL is then included as the key "build_url".
And it works.
Using shell command you can download hockey app
BUILD=$1
TOKEN="3a583f6d11164f0498f818a4e06c249e"
APP="ca47e3a4ce8a453cb40d8df4781beee5"
VERSION=$(curl \
-H "X-HockeyAppToken: $TOKEN" \
https://rink.hockeyapp.net/api/2/apps/$APP/app_versions \
| jq --arg BUILD "$BUILD" '.app_versions | .[] | select(.version==$BUILD) | .id')
curl -L -o $BUILD.apk https://rink.hockeyapp.net/api/2/apps/$APP/app_versions/$VERSION?format=apk
echo "!!!DONE!!!"