Get Certificate
Retrieve a certificate using the token and either a certificate ID or UDID. Smart selection applies when querying by UDID
/api/getcertificateRequest Parameters
All parameters can be passed via Query or Body
| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | Required | User API token Example: your_api_token_here |
id | string | Optional | Certificate ID. Either id or udid is required. If both are provided, id takes priority Example: AB12CD34 |
udid | string | Optional | Device UDID. Either id or udid is required. Smart selection applies when querying by UDID Example: 00008020-001A2B3C4D5E6F78 |
Response
| Parameter | Type | Required | Description |
|---|---|---|---|
code | number | Required | Status code: 1=success, 0=failure, 2=no available certificate, 3=certificate expired Example: 1 |
msg | string | Required | Response message Example: 返回成功 |
time | number | Required | Server timestamp (Unix seconds) Example: 1769675945 |
data | object | Required | Response payload |
data.id | string | Required | Certificate ID Example: AB12CD34 |
data.pname | string | Required | Project name Example: MyApp |
data.addtime | number | Required | Added time (Unix timestamp) Example: 1706500000 |
data.pool | number | Required | Pool: 0=public, 1=private Example: 0 |
data.type | number | Required | Pool type: 0=public, 1=private Example: 0 |
data.mobileprovision | string | Required | Base64-encoded mobileprovision Example: MIIPhgYJKoZIhvcNAQcCoII...(Base64) |
data.p12 | string | Required | Base64-encoded P12 certificate Example: MIINDgIBAzCCDMsGCSqGSIb3DQEHAa...(Base64) |
data.state | boolean | Required | Certificate validity: true=valid, false=revoked Example: true |
data.warranty | boolean | Required | Whether warranty is active Example: true |
data.warranty_time | number | Required | Warranty expiration time (Unix timestamp) Example: 1738000000 |
data.shtype | number | Required | Warranty type: 0/1/2/3/4/6 Example: 1 |
ysucc | string | Required | Success flag, returns "Ysucc" on success Example: Ysucc |
Error Codes
000Response Language
Customize the API response language with the X-Lang header. The code examples below automatically use your current site language.
X-Lang: enzh, en, zh-TW, vi, arAccept-Language is also supported; X-Lang takes priority. Unsupported languages fall back to English.
Code Examples
curl -X GET "https://testypro.iwai.cc,https://cer.xyul.cn,https://cer.iwai.cc/api/getcertificate?token=your_api_token_here&id=AB12CD34&udid=00008020-001A2B3C4D5E6F78" \
-H "X-Lang: en"Notes
- Supports both GET and POST
- Send parameters via Query or x-www-form-urlencoded
- Either id or udid is required. If both are provided, id takes priority
- When querying by UDID, the system selects the best certificate: valid first, then revoked but not disabled
- state=false means the certificate is revoked but still downloadable (apps may not install)
- warranty_time is the warranty expiration time. Repurchase is required after it expires
Try it in Console
Fill in the parameters below and send a request to test. Requests only go to this site's API; the URL is locked and cannot be changed, and your current login cookie is included.
https://testypro.iwai.cc/api/getcertificate?token=your_api_token_here&id=AB12CD34&udid=00008020-001A2B3C4D5E6F78Locked to this siteUser API token
Certificate ID. Either id or udid is required. If both are provided, id takes priority
Device UDID. Either id or udid is required. Smart selection applies when querying by UDID