Pgyer Docs
API 2.0

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.

GEThttps://www.pgyer.com/apiv2/app/install

Call with GET, and only from inside iOS or Android.

This is a paid endpoint. Each user gets 200 free requests per day; beyond that, each call costs ¥0.03 deducted from your Pgyer balance. When the balance runs out, the endpoint returns an error — keep the account topped up.

Request Parameters

ParameterTypeRequiredDescription
_api_keyStringYesAPI Key — see auth
appKeyStringConditionallyAccepts appKey or the app short URL; installs the latest version. appKey and buildKey cannot both be empty
buildKeyStringConditionallySee buildKey — installs a specific version. appKey and buildKey cannot both be empty
buildPasswordStringNoInstall 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}

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}"]];

On this page