Upload API
Streamline your build process and upload APKs or IPAs directly to TestFairy.
Usage
Upload API
POSThttps://upload.testfairy.com/api/upload/
Parameters
api_key | | REQUIRED | Your API application key. See https://app.testfairy.com/settings for details. |
file | | REQUIRED | Android Package Kit (APK), Android App Bundle (AAB), iOS package App Store (IPA), or ZIP (MacOS) file data. |
symbols_file | | OPTIONAL | Symbols mapping file. For iOS, this is a path to the zipped symbols file (dSYM). For Android, this is the path to the .txt file |
groups | | OPTIONAL | Comma-separated list of tester groups that get permission to download this app. |
notify | | OPTIONAL | Send email to all users in 'groups'. It can be |
release_notes | | OPTIONAL | Release notes for this upload. This text adds to emails and landing pages. |
auto_update | | OPTIONAL | Allows to upgrade all users to the current version. It can be |
tags | | OPTIONAL | Set of comma-separated tags to be displayed and searched upon. |
folder_name | | OPTIONAL | Name of the dashboard folder that contains this app |
landing_page_mode | | OPTIONAL | Landing page mode. It can be |
upload_to_saucelabs | | OPTIONAL | Upload file directly to Sauce Labs. It can be |
platform | | OPTIONAL | In case the app is not iOS or Android, which are detected automatically, use this to mark an app for specific desktop or console platforms. Values can be "Xbox", "PlayStation", "switch", "windows", "macos". This feature is not enabled by default. Contact support for more information. |
- Required Params
- Optional Params
curl https://upload.testfairy.com/api/upload -F api_key='your_api_key' -F file=@sample.apk
curl https://upload.testfairy.com/api/upload \
-F api_key='your_api_key' \
-F file=@sample.apk \
-F symbols_file=@sample_mapping.txt \
-F groups='friends,beta' \
-F notify='on' \
-F release_notes='stabilitty fixes, improvement in ui' \
-F tags='production, english
Responses
In the case of an error, TestFairy returns a JSON withstatus
=> fail
and code
with one of the values listed below. TestFairy supplies an additional human-readable error message to detail the cause of the specific error.200 | Success. | |
1 | Parameter 'xxx' is missing. | |
5 | Invalid API key. | |
105 | Invalid file. |
{
"status": "ok",
"build_id": "106410",
"project_id": "61545",
"app_name": "My Demo App",
"app_version": "2.0.2",
"file_size": 2319620,
"build_url": "https://app.testfairy.com/projects/61545/builds/106410",
"download_page_url": "https://tsfr.io/31thr2",
"app_url": "https://app.testfairy.com/download/64R3CE1R6GRK0B9AXMCY77GJWBAW5K7XYV8K0T0CW/getapp",
"invite_testers_url": "https://app.testfairy.com/projects/61545/builds/106410/invite",
"icon_url": "https://s3.amazonaws.com/testfairy/icons/876033/230c74eece00376eb476516755.png",
"options": "video-quality=medium,screenshot-interval=1,session-length=60m,video,logcat,shake,cpu,memory,phone-signal,battery,wifi",
"platform": "iOS",
"tags": [],
"metadata": [],
"has_testfairy_sdk": true,
"symbols_download_url": "https://app.testfairy.com/api/1/projects/61545/builds/106410/symbols/download/",
"attachments": null,
"landing_page_url": "https://app.testfairy.com/join/31thr2",
"build_specific_landing_page_url": "https://app.testfairy.com/join/31thr2?id=106410"
}
Where Can I Find My API Key?
To get your API KEY, open your account preferences at https://app.testfairy.com/settings/ and click on Upload API Key.
How Can I Create a New API Key?
To create a new API KEY, click on Regenerate API Key on your account preferences page.
Why Is My API Key Empty?
In cases TestFairy identifies that by mistake, you initialize the SDK by using your API KEY instead of using your APP TOKEN, TestFairy automatically reset the API KEY to protect your privacy. In this case, change the SDK initialization to use the APP TOKEN and create a new API KEY.
Can I Add Custom Metadata?
Yes. Any POST parameter prefixed with "metadata." in the name is considered custom data and stored along with the upload. For example, consider this command:
curl https://upload.testfairy.com/api/upload \
-F api_key='your_api_key' \
-F file=@sample.apk \
-F metadata.branch=master \
-F metadata.locale=us-en
Metadata is displayed and can be searched on in App Versions page by clicking on an app from the Dashboard. You can also view them on a single version's settings page.
Can I attach the symbols file to my app to download it later?
Yes! You can attach your dSYM zipped for iOS / Text file .txt for Android app while uploading the app. Check out the Upload/Download Symbols file documentation for more details.