Install
Trigger app install on Pgyer from your own systems: the generic install endpoint and iOS in-app install.
Two ways to trigger an install through the API: the generic install endpoint and iOS in-app install.
Install App
Use this endpoint to embed Pgyer's install capability into your own systems — you won't need to route users through Pgyer's download web page.
https://www.pgyer.com/apiv2/app/installCall with GET, and only from inside iOS or Android.
Each account gets 200 free uses per day. Excess usage is charged to the account balance according to installer size; see Download Pricing for the pricing tiers. A request counts after validation when it enters the flow that generates a download link or installation redirect, without waiting for the file download to finish. Version-update downloads are currently free and do not use this endpoint’s quota. Once the free quota is exhausted, the endpoint returns an error if the balance cannot cover the charge.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| _api_key | String | Yes | API Key — see auth |
| appKey | String | Conditionally | Accepts appKey or the app short URL; installs the latest version. appKey and buildKey cannot both be empty |
| buildKey | String | Conditionally | See buildKey — installs a specific version. appKey and buildKey cannot both be empty |
| buildPassword | String | No | Install password, if the app requires one |
Response
The endpoint auto-selects the right install flow based on the app's platform (iOS or Android).
Example
https://www.pgyer.com/apiv2/app/install?_api_key={_api_key}&buildKey={buildKey}&buildPassword={buildPassword}This URL contains an API key and, for password-protected installs, the install password. Treat the complete URL as sensitive: generate and use it only in a controlled client, and do not publish it, embed it in public frontend source, or write it to public logs. Browser history, proxies/CDNs, and server access logs may also retain the full query string, so restrict log retention and access accordingly.
iOS In-App Install
iOS in-app install uses the itms-services:// URL scheme so users can trigger an install without leaving the app for a browser.
Public install URL:
itms-services://?action=download-manifest&url=https://www.pgyer.com/app/plist/{buildKey}Password install URL:
itms-services://?action=download-manifest&url=https://www.pgyer.com/app/plist/{buildKey}?password={password}Replace {buildKey} with the app's buildKey and {password} with the install password (without the braces).
Examples
Web link:
<a href="itms-services://?action=download-manifest&url=https://www.pgyer.com/app/plist/{buildKey}">Install</a>iOS client:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms-services://?action=download-manifest&url=https://www.pgyer.com/app/plist/{buildKey}"]];Or hit the install endpoint directly:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://www.pgyer.com/apiv2/app/install?_api_key={_api_key}&buildKey={buildKey}&buildPassword={buildPassword}"]];