Automation and Scripting with AppForShare
By Nimrah Bilal · · 4 min read

You can automate AppForShare by uploading builds from your CI pipeline with the AppForShare command line tool and an upload token, and by sending build events to Slack, Discord or your own server with webhooks. Every build your pipeline produces then gets an install link and release notes without anyone opening a browser. CI uploads and webhooks are part of the Pro and Team plans.
This guide shows what can be automated, how to set it up in common CI systems, and what is not automated today.
What you can automate
| Task | How | Plan |
|---|---|---|
| Upload a build and get its install link | CLI with an upload token | Pro, Team |
| Attach release notes | --notes or --notes-file | Pro, Team |
| Post new builds to chat | Slack or Discord webhook | Pro, Team |
| Trigger your own scripts | Generic webhook signed with HMAC-SHA256 | Pro, Team |
| Email testers when a build is ready | Tester management on private projects | Team |
Uploading from CI with the CLI
The CLI needs Node 18 or newer and an upload token, which you create under Dashboard, Settings. Store the token as a secret in your CI system, never in the repository. The basic command is:
export APPFORSHARE_TOKEN=afs_your_token
npx appforshare upload build/MyApp.ipa --notes "Fixes the login crash"
The command prints the install link when the build is ready. Useful options:
--notesor--notes-file: release notes for testers.--json: prints the URL, slug, name, version and expiry as JSON for later steps.--no-wait: returns as soon as the upload is queued.
Large builds go up in 32 MB chunks and resume after a dropped connection.
GitHub Actions
Add the token as a repository secret named APPFORSHARE_TOKEN, then add a step after your build:
- name: Share build
id: afs
run: npx --yes appforshare@1 upload app/build/outputs/apk/release/app-release.apk --notes "${{ github.event.head_commit.message }}"
env:
APPFORSHARE_TOKEN: ${{ secrets.APPFORSHARE_TOKEN }}
- run: echo "Install link: ${{ steps.afs.outputs.url }}"
Fastlane
Run the upload after gym or your Gradle task in a lane:
lane :beta do
gym(export_method: "ad-hoc")
sh("npx --yes appforshare upload ../#{lane_context[SharedValues:IPA_OUTPUT_PATH]}")
end
GitLab CI, Bitrise, Codemagic and other systems work the same way: any job that can run Node can run the command. The full examples are in the CI documentation.
Webhooks for notifications and scripts
Webhooks send an HTTP request when something happens in your account. AppForShare can format them for Slack and Discord, or send a generic JSON payload to your own endpoint. Events include:
build.ready: a build finished processing and its install link works.build.failed: an upload could not be turned into a build.build.installed: someone started an install, with device, OS version, model and country.bandwidth.warning: monthly bandwidth reached 80% or 100%.
Generic webhooks are signed with HMAC-SHA256 so your server can check that a request really came from AppForShare. Retries send the same event id, so you can skip duplicates. See the webhooks documentation for the payload format and a signature check example.
Common uses: post every new build to a QA channel, open a ticket in your own tracker when a build fails, or alert the team when bandwidth is running low.
What is not automated
- AppForShare does not build or sign your app. Your CI produces the APK or IPA; AppForShare shares it.
- It does not re-sign iOS builds or add UDIDs to provisioning profiles. You add device UDIDs in the Apple Developer portal and rebuild.
- There are no built-in integrations with Jira, GitHub issues or Firebase. Webhooks let you connect your own tools.
- CI uploads and webhooks are not available on the Free plan or for guest uploads.
A typical automated flow
- A developer pushes to the main branch.
- CI builds a signed APK or Ad Hoc IPA.
- The CLI uploads it with the commit message as release notes.
- The
build.readywebhook posts the install link to Slack. - On Team, invited testers of a private project get an email that a new build is ready.
- Testers install from the link or QR code on their phones.
Frequently asked questions
Can I upload builds to AppForShare from CI?
Yes, on Pro and Team. Create an upload token under Dashboard, Settings and run the AppForShare CLI with npx in GitHub Actions, GitLab CI, Fastlane or any shell with Node 18 or newer.
Does AppForShare support Slack and Discord notifications?
Yes. Pro and Team accounts can add Slack, Discord or generic signed webhooks for events such as build ready, build failed, build installed and bandwidth warnings.
Does AppForShare build or sign my app?
No. Your own build system creates and signs the APK or IPA. AppForShare uploads it and creates the install link.
Is there an integration with Jira or GitHub issues?
No. There are no built-in Jira or GitHub issue integrations. You can connect your own tools by receiving AppForShare webhooks on your server.


