API keys and CI builds
Updated
Personal API keys let your scripts and CI pipelines use the AppSorcerer API: start a build after each release of your website, wait for it and download the APK or AAB. A key acts as you, with your role, in one workspace.
Create a key
- Open Settings → Personal API keys and press Create API key.
- Name it after where you'll use it, for example GitHub Actions.
- Copy the key. It starts with
as_live_and is shown only once.
A key works in the workspace that was open when you created it. You can have up to 25 active keys; the list shows when each was last used. Revoke a key you no longer need, or one that may have leaked. Confirm your email address before you create keys.
What a key can do
A key can do what you can do in its workspace with your role: list apps, start and cancel builds, read build status and logs, and download artifacts and the App Links file. Account and money matters stay in App Studio, in person: your password, two-factor authentication, email address, API keys, billing, data exports, notifications and switching workspaces. The API answers those with 403 and details.reason API_KEY.
Authenticate
Send the key in the Authorization header of every request. The base address is your App Studio address followed by /api, for example https://appsorcerer.com/api.
export APPSORCERER_API_URL="https://appsorcerer.com/api"
export APPSORCERER_API_KEY="as_live_..." # keep it in your CI secrets
curl -s "$APPSORCERER_API_URL/apps" -H "Authorization: Bearer $APPSORCERER_API_KEY"Requests with a key need no cookie and no CSRF header. Every response is JSON: { "data": … } when it works, { "error": { "code", "message", "details" } } when it doesn't.
Find your app ID
GET /api/apps lists your apps with their id. In App Studio the ID is also in the address bar: /app/<appId>/overview.
Start a build
curl -s -X POST "$APPSORCERER_API_URL/apps/$APP_ID/builds" \
-H "Authorization: Bearer $APPSORCERER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"platform":"android","kind":"test"}'kind is test (an APK to install yourself), store (a signed AAB and APK for Google Play, from the Starter plan) or source (the Android project as a zip). The answer is 201 with the new build, including its id and status.
Check the build status
Poll GET /api/apps/{appId}/builds/{buildId} every 15–30 seconds. status goes through queued, preparing, compiling, signing and uploading, and ends with success, failed or canceled; a failed build has an errorMessage in plain words. While a build waits, GET /api/apps/{appId}/builds/{buildId}/queue returns its position and the estimated wait. A build usually takes 4–6 minutes.
Download the artifact
curl -sL "$APPSORCERER_API_URL/apps/$APP_ID/builds/$BUILD_ID/download?artifact=apk&redirect=1" \
-H "Authorization: Bearer $APPSORCERER_API_KEY" -o app.apkartifact is apk, aab (store builds), source or log. Without redirect=1 the answer is { "data": { "url", "fileName", "expiresAt" } }: a signed link that works for a short time. Artifacts are kept for as many days as your plan includes.
Read the build log
GET /api/apps/{appId}/builds/{buildId}/log returns { "data": { "lines": [ … ], "truncated": false } }.
Errors and limits
| Status | Code | What it means |
|---|---|---|
| 401 | UNAUTHORIZED | The key is wrong or was revoked |
| 402 | PLAN_LIMIT | The plan's builds for this month are used up, or store builds aren't in your plan |
| 403 | FORBIDDEN | Your role can't do this (builds need Owner, Admin or Editor), the app is paused, or it's a Studio-only action |
| 404 | NOT_FOUND | The app isn't in the key's workspace, or you have no access to it |
| 409 | CONFLICT | A build of this app is already running: wait for it or cancel it |
| 429 | RATE_LIMITED | Too many requests: wait and try again (20 new builds a minute per person) |
Example: GitHub Actions
Save the key as a repository secret named APPSORCERER_API_KEY and your app ID as APPSORCERER_APP_ID.
name: App build
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
API: https://appsorcerer.com/api
KEY: ${{ secrets.APPSORCERER_API_KEY }}
APP: ${{ secrets.APPSORCERER_APP_ID }}
steps:
- name: Build and download the APK
run: |
id=$(curl -sf -X POST "$API/apps/$APP/builds" -H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" -d '{"platform":"android","kind":"test"}' | jq -r .data.id)
while true; do
status=$(curl -sf "$API/apps/$APP/builds/$id" -H "Authorization: Bearer $KEY" | jq -r .data.status)
echo "Build $id: $status"
case "$status" in success) break ;; failed|canceled) exit 1 ;; esac
sleep 20
done
curl -sfL "$API/apps/$APP/builds/$id/download?artifact=apk&redirect=1" -H "Authorization: Bearer $KEY" -o app.apk
- uses: actions/upload-artifact@v4
with:
name: app
path: app.apkCommand-line tool
There is no AppSorcerer command-line tool yet. Use the API directly, as in the examples above.