Skip to content

Android Application Get Upgrade Strategy

Interface Description: Get the corresponding upgrade strategy based on the client's version number.

📮 Request Information

Request URL

POST https://api.upgrade.toolsetlink.com/v1/apk/upgrade

Request Headers

Parameter NameRequiredTypeExample ValueDescription
X-TimestampYesstring2025-02-17T10:34:55+08:00Request time in RFC3339 format
X-NonceYesstringfc812cc0b9b51e8cUnique random string (at least 16 characters)
X-AccessKeyYesstringmui2W50H1j-OC4xD6PgQagAccess Key
X-SignatureYesstring3603437250c2df51fc46426ac79d8995Request signature Signature Rules
Content-TypeYesstringapplication/json

🔐 Replay Attack Prevention Mechanism

  1. Server validates timestamp difference with server time not exceeding ±5 minutes
  2. Server checks if Nonce value already exists (prevents duplicate requests)

Request Body

json
{
    "apkKey": "isVZBUvkFhv6oHxk_X-D0Q",
    "versionCode": 1,
    "appointVersionCode": 0,
    "devModelKey": "stv1",
    "devKey": "LOYlLXNy7w"
}

Request Body Parameter Description

Parameter NameRequiredTypeExample ValueDescription
apkKeyYesstringisVZBUvkFhv6oHxk_X-D0QAndroid Application Unique Identifier
versionCodeYesint1Client Version Number
appointVersionCodeNoint0Expected upgrade version number, defaults to latest version if not provided or set to 0
devModelKeyNostringstv1Device Model Unique Identifier
devKeyNostringLOYlLXNy7wDevice Unique Identifier (can use mac as unique identifier)

📮 Response Information

Success Response Body

json
{
  "code": 200,
  "msg": "New version obtained",
  "data": {
    "apkKey": "isVZBUvkFhv6oHxk_X-D0Q",
    "packageName": "com.a.c",
    "versionName": "v2",
    "versionCode": 2,
    "urlPath": "https://cdn.upgrade.toolsetlink.com/upgrade/2025-07-02/image/20250702102511_dl-logo-48x.png",
    "urlFileSize": 7213,
    "urlFileMd5": "",
    "upgradeType": 1,
    "promptUpgradeContent": "Prompt content"
  }
}

Response Body Parameter Description

Parameter NameTypeExample ValueDescription
apkKeystringisVZBUvkFhv6oHxk_X-D0QAndroid Application Unique Identifier
packageNamestringcom.a.cAndroid Application Package Name
versionNamestringv1Version Name
versionCodeint1Version Number
urlPathstringhttp://file.com/2.apkFile Download URL
urlFileSizeint7213File Size (bytes)
urlFileMd5stringisVZBUvkFhv6oHxkFile MD5
upgradeTypeint1Upgrade Method: 1: Prompt upgrade; 2: Silent upgrade; 3: Force upgrade
promptUpgradeContentstringPrompt contentUpgrade description content

Typical Error Response Body

json
{
  "code": 404001,
  "msg": "No usable version found",
  "docs": "No corresponding application version found. Please confirm if it has been correctly created in the system. Please refer to documentation: http://upgrade.toolsetlink.com/upgrade/recommend/apk/app-version.html",
  "data": null
}

📊 Status Codes

HTTP Status CodeCodeScenario DescriptionSolution
2000Request successful, already at latest version
200200Request successful, obtained version upgrade strategy
400400001Illegal request
400400002Missing parameters
400400003Invalid parameters
400400004Invalid headers
400400005Invalid request body
401401001Authentication failed
401401002Signature verification failed
404404001Resource does not exist
404404002Query record does not exist
404404003Processing method does not exist
404404004Request does not exist
429429001Application task strategy request rate limitCurrent upgrade task configuration request rate limit has been reached, please try again later.
500500001Server internal errorContact us Contact Us
500500002Server internal data validation failedContact us Contact Us

toolsetlink@163.com