GETPOST
v1.0.0stable

Get Certificate

Retrieve a certificate using the token and either a certificate ID or UDID. Smart selection applies when querying by UDID

GET | POST/api/getcertificate
Auth:API Key
Limit:120/minute

Request Parameters

All parameters can be passed via Query or Body

ParameterTypeRequiredDescription
token
stringRequired
User API token
Example: your_api_token_here
id
stringOptional
Certificate ID. Either id or udid is required. If both are provided, id takes priority
Example: AB12CD34
udid
stringOptional
Device UDID. Either id or udid is required. Smart selection applies when querying by UDID
Example: 00008020-001A2B3C4D5E6F78

Response

ParameterTypeRequiredDescription
code
numberRequired
Status code: 1=success, 0=failure, 2=no available certificate, 3=certificate expired
Example: 1
msg
stringRequired
Response message
Example: 返回成功
time
numberRequired
Server timestamp (Unix seconds)
Example: 1769675945
data
objectRequired
Response payload
data.id
stringRequired
Certificate ID
Example: AB12CD34
data.pname
stringRequired
Project name
Example: MyApp
data.addtime
numberRequired
Added time (Unix timestamp)
Example: 1706500000
data.pool
numberRequired
Pool: 0=public, 1=private
Example: 0
data.type
numberRequired
Pool type: 0=public, 1=private
Example: 0
data.mobileprovision
stringRequired
Base64-encoded mobileprovision
Example: MIIPhgYJKoZIhvcNAQcCoII...(Base64)
data.p12
stringRequired
Base64-encoded P12 certificate
Example: MIINDgIBAzCCDMsGCSqGSIb3DQEHAa...(Base64)
data.state
booleanRequired
Certificate validity: true=valid, false=revoked
Example: true
data.warranty
booleanRequired
Whether warranty is active
Example: true
data.warranty_time
numberRequired
Warranty expiration time (Unix timestamp)
Example: 1738000000
data.shtype
numberRequired
Warranty type: 0/1/2/3/4/6
Example: 1
ysucc
stringRequired
Success flag, returns "Ysucc" on success
Example: Ysucc
Response Example
{
"code":1,
"msg":"Success",
"time":1769675945,
"data":
{
"id":"AB12CD34",
"pname":"MyApp",
"addtime":1706500000,
"pool":0,
"type":0,
"mobileprovision":"MIIPhgYJKoZIhvcNAQcCoII...(Base64)",
"p12":"MIINDgIBAzCCDMsGCSqGSIb3DQEHAa...(Base64)",
"state":true,
"warranty":true,
"warranty_time":1738000000,
"shtype":1
}
,
"ysucc":"Ysucc"
}

Error Codes

Error Codes7 defined
0
Token verification failed
Invalid or expired token
0
At least one of certificate ID or UDID must be provided
Either id or udid parameter is required
0
Certificate ID not found
Certificate ID does not exist or does not belong to current user

Response Language

Customize the API response language with the X-Lang header. The code examples below automatically use your current site language.

Recommended Header
X-Lang: en
Supported Languages
zh, en, zh-TW, vi, ar

Accept-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 site
stringRequired

User API token

string

Certificate ID. Either id or udid is required. If both are provided, id takes priority

string

Device UDID. Either id or udid is required. Smart selection applies when querying by UDID