AppForShareCreate a free account

Keep your Diawi upload script, change the URL

Pro and Team

Many build scripts still call the Diawi upload API: a curl line in a CI job, an npm uploader, an old plugin nobody wants to touch. Moving them to another service usually means rewriting each one.

AppForShare answers the same request. POST the multipart form to https://appforshare.io/api/ci/diawi with your AppForShare token, get a job id, and poll the status call for 2000, 2001 or 4000 with the link and QR code. Your testers get an AppForShare install page.

Example

POST /api/ci/diawi

  • jobQ3vF8kL2mN0pR7sT
  • status2000 Ok
  • linkappforshare.io/i/Stw0Ae
  • qrcodeappforshare.io/i/Stw0Ae/qr
Up to 100 MB per request. Bigger builds go through the CLI.

Made for

  • Teams with CI jobs or scripts written against the Diawi API
  • Developers who use a Diawi uploader package that lets them set the upload and status URLs
  • Anyone who wants longer links and .aab support without touching the pipeline twice

What it ends

  • Rewriting every upload step to try a new service
  • Links that end a few days after the last install
  • An upload refused because the file is an .aab

How it works

  1. Step 1

    Make a token

    Under Dashboard, Settings, API tokens. It starts with afs_ and replaces the Diawi token in the token field, or goes in an Authorization: Bearer header.

  2. Step 2

    Change the URL

    POST to https://appforshare.io/api/ci/diawi with the same fields: token, file, and optional password, comment, callback_url and callback_emails. The answer is a job id.

  3. Step 3

    Poll the status

    GET /api/ci/diawi/status?token=&job= answers 2001 while processing, then 2000 with hash, link and qrcode, or 4000 with the reason.

How each field maps

password sets the install link password (4 to 128 characters). comment becomes the release notes testers read on the install page. callback_url must be https: we call it once when the build is ready or failed, with the same fields as the status call, and do not retry, so the status call stays the reliable way to learn the result. callback_emails takes up to 5 addresses, and each gets the install link by email.

installation_notifications, find_by_udid and wall_of_apps are accepted so old scripts do not fail, and ignored. For install news, turn on the daily install email or a webhook. For device checks, testers use Remember this device on the install page. There is no public app wall. You can also add channel to put the build into a channel such as beta.

Files and sizes

The file field takes an .ipa, a zipped .app (turned into an .ipa), an .apk or an .aab (turned into one universal APK). One request through the endpoint carries up to 100 MB. For bigger builds use the AppForShare CLI, which uploads in parts and resumes after a dropped connection, up to your plan's file limit.

Good to know

Questions

Which plan do I need?
Pro or Team, the same plans that include API tokens for CI.
Does it work with a Diawi uploader package?
Yes, when the package lets you set the upload and status URLs. Point them at https://appforshare.io/api/ci/diawi and https://appforshare.io/api/ci/diawi/status and give it your AppForShare token.
Can I send the token as a header?
Yes. Authorization: Bearer afs_... works on both calls, so the token does not have to be in the form or the query string.
What does the QR code address return?
A PNG of the QR code for the install link, at /i/<code>/qr.

Read next

Try it on your own app

Free account in a minute. Pro starts with a 7 day free trial.

More features