VSPhone OpenAPI Developer Quick Reference
For AI/LLM/code assistants. Full request/response params and examples see OpenAPI.md, auth and signing see example.md.
Authentication
HMAC-SHA256 signature verification (required)
Request headers (required per request):
- x-date: Request UTC time, ISO 8601 format (e.g. 20240301T093700Z)
- x-host: API host (api.vsphone.com)
- Content-Type: application/json
- authorization: HMAC-SHA256 signature
Signature format:
HMAC-SHA256 Credential={AccessKey}, SignedHeaders=content-type;host;x-content-sha256;x-date, Signature={Signature}
Signature steps and examples see Getting Started example.md
Base Information
- Base URL: https://api.vsphone.com
- Path prefix: /vsphone/api/padApi/
- Response format: JSON {code, msg, ts, data}
- Success code: code=200
API List
1. Instance Management
| Method | Endpoint | Description | Parameters |
|---|---|---|---|
| POST | /vsphone/api/padApi/setWifiList | Modify instance WIFI properties | padCodes[], wifiJsonList[], SSID, BSSID, MAC, IP, gateway, DNS1, DNS2... |
| POST | /vsphone/api/padApi/padDetails | Instance details (pending) | padCodes[], padIps[], vmStatus, controlStatus, faultStatus, deviceStatus |
| POST | /vsphone/api/padApi/restart | Instance restart | padCodes[] |
| POST | /vsphone/api/padApi/reset | Instance reset | padCodes[] |
| POST | /vsphone/api/padApi/padProperties | Query instance properties | padCode |
| POST | /vsphone/api/padApi/batchPadProperties | Batch query instance properties | padCodes[] |
| POST | /vsphone/api/padApi/updatePadProperties | Modify instance properties (dynamic) | padCodes[], modemPersistPropertiesList[], propertiesName... |
| POST | /vsphone/api/padApi/updatePadAndroidProp | Modify instance Android modification props (restart required) | padCode, restart, props, ro.product.vendor.name |
| POST | /vsphone/api/padApi/updateSIM | Modify SIM by country code | padCode, countryCode, props, ro.product.vendor.name |
| POST | /vsphone/api/padApi/dissolveRoom | Stop streaming | padCodes[] |
| POST | /vsphone/api/padApi/checkIP | Smart IP proxy detection | host, port, account, password, type, country, ip, loc, city... |
| POST | /vsphone/api/padApi/smartIp | Set smart IP | padCodes[], host, port, account, password, type, mode... |
| POST | /vsphone/api/padApi/notSmartIp | Cancel smart IP | padCodes[] |
| POST | /vsphone/api/padApi/getTaskStatus | Device task result query (smart IP) | taskId |
| POST | /vsphone/api/padApi/getListInstalledApp | Get installed apps for specified instances | padCodeList[] |
| POST | /vsphone/api/padApi/updateTimeZone | Modify instance timezone | timeZone, padCodes[] |
| POST | /vsphone/api/padApi/updateLanguage | Modify instance language | language, country, padCodes[] |
| POST | /vsphone/api/padApi/gpsInjectInfo | Set instance GPS | longitude, latitude, altitude, speed, bearing... |
| POST | /vsphone/api/padApi/replacePad | One-key new device | padCodes[], countryCode, realPhoneTemplateId, androidProp... |
| GET | /vsphone/api/padApi/country | Query one-key new device supported countries | - |
| POST | /vsphone/api/padApi/updateContacts | Update contacts | padCodes[], fileUniqueId, operateType, info[]... |
| POST | /vsphone/api/padApi/setProxy | Set instance proxy | account, password, ip, port, enable, padCodes[], proxyType... |
| POST | /vsphone/api/padApi/listInstalledApp | Real-time query installed app list | padCodes[], appName |
| POST | /vsphone/api/padApi/setKeepAliveApp | Set app keep-alive | padCodes[], applyAllInstances, appInfos[], serverName |
| POST | /vsphone/api/padApi/asyncCmd | Async execute ADB command | padCodes[], scriptContent |
| POST | /vsphone/api/padApi/switchRoot | Switch Root permission | padCodes[], globalRoot, packageName, rootStatus |
| POST | /vsphone/api/padApi/screenshot | Local screenshot | padCodes[], rotation, broadcast, definition, resolutionHeight... |
| POST | /vsphone/api/padApi/getLongGenerateUrl | Get instance real-time preview image | padCodes[], format, height, width, quality |
| POST | /vsphone/api/padApi/upgradeImage | Upgrade image | padCodes[], imageId, wipeData, enableCpuCoreConfig |
| POST | /vsphone/api/padApi/virtualRealSwitch | Upgrade real device image | padCodes[], imageId, wipeData, realPhoneTemplateId... |
| POST | /vsphone/api/padApi/templateList | Paginated get real device templates | page, rows |
| POST | /vsphone/api/padApi/openOnlineAdb | Enable/disable ADB | padCodes[], openStatus |
| POST | /vsphone/api/padApi/adb | Get ADB connection info | padCode, enable |
| POST | /vsphone/api/padApi/simulateTouch | Simulate touch | padCodes[], width, height, pointCount, positions[] |
| POST | /vsphone/api/padApi/padTaskDetail | Instance operation task details | taskIds[], taskId |
| POST | /vsphone/api/padApi/infos | Instance group list / instance list info | page, rows, padType, padCodes[] |
| POST | /vsphone/api/padApi/addPhoneRecord | Import call records | padCodes[], callRecords[] |
| POST | /vsphone/api/padApi/inputText | Cloud phone text input | padCodes[], text, code, msg, ts, data[]... |
| POST | /vsphone/api/padApi/simulateSendSms | Simulate send SMS | padCodes[], senderNumber, smsContent |
| POST | /vsphone/api/padApi/resetGAID | Reset GAID | padCodes[], resetGmsType, oprBy, taskSource |
| POST | /vsphone/api/padApi/injectAudioToMic | Inject audio to instance microphone | padCodes[], url, fileUniqueId, enable |
| POST | /vsphone/api/padApi/addUserRom | Upload user image | name, updateLog, androidVersion, version, downloadUrl, packageSize |
| POST | /vsphone/api/padApi/replacement | Device replacement | padCode |
| POST | /vsphone/api/padApi/confirmTransfer | Transfer cloud phone | padCodes[], makeOverMobilePhone |
2. Resource Management
| Method | Endpoint | Description | Parameters |
|---|---|---|---|
| POST | /vsphone/api/padApi/infos | Instance list info (paginated query ordered instances) | page, rows, padType, padCodes[] |
3. Application Management
| Method | Endpoint | Description | Parameters |
|---|---|---|---|
| POST | /vsphone/api/padApi/uninstallApp | Uninstall app | apkPackageList[], padCodeList[] |
| POST | /vsphone/api/padApi/startApp | Start app | pkgName, padCodes[] |
| POST | /vsphone/api/padApi/stopApp | Stop app | pkgName, padCodes[] |
| POST | /vsphone/api/padApi/restartApp | Restart app | pkgName, padCodes[] |
| POST | /vsphone/api/padApi/listInstalledApp | Instance installed app list query | padCodes[], appName |
| POST | /vsphone/api/padApi/uploadFileV3 | Upload file via URL | padCodes[], padCode, autoInstall, fileUniqueId... |
| POST | /vsphone/api/padApi/uploadFile | Upload file to cloud storage | file |
| POST | /vsphone/api/padApi/deleteOssFiles | Delete cloud storage files | files[], urls[] |
| POST | /vsphone/api/padApi/selectFiles | Query user file list | - |
4. Task Management
| Method | Endpoint | Description | Parameters |
|---|---|---|---|
| POST | /vsphone/api/padApi/padTaskDetail | Instance operation task details | taskIds[], taskId |
| POST | /vsphone/api/padApi/fileTaskDetail | File task details | taskIds[], taskId |
5. Cloud Phone Management
| Method | Endpoint | Description | Parameters |
|---|---|---|---|
| POST | /vsphone/api/padApi/createMoneyOrder | Create/renew cloud phone | androidVersionName, goodId, goodNum, autoRenew, equipmentId |
| POST | /vsphone/api/padApi/userPadList | Cloud phone list | padCode, equipmentIds[] |
| POST | /vsphone/api/padApi/padInfo | Cloud phone info query | padCode |
| GET | /vsphone/api/padApi/getCloudGoodList | SKU package list | androidVersion |
| POST | /vsphone/api/padApi/createMoneyProOrder | Device presale purchase | androidVersionName, goodId, goodNum, autoRenew |
| POST | /vsphone/api/padApi/queryProOrderList | Query presale order result details | proBuyStatus, orderId |
| POST | /vsphone/api/padApi/imageVersionList | Android image version list | padCode |
6. TK Automation
| Method | Endpoint | Description | Parameters |
|---|---|---|---|
| POST | /vsphone/api/padApi/autoTaskList | Automation task list query | taskIds[], taskType, page, rows |
| POST | /vsphone/api/padApi/addAutoTask | Create automation task | taskName, remarks, taskType, list[] |
| POST | /vsphone/api/padApi/reExecutionAutoTask | Automation task retry | taskIds[], plannedExecutionTime |
| POST | /vsphone/api/padApi/cancelAutoTask | Automation task cancel | taskIds[] |
7. SDK Token
| Method | Endpoint | Description | Parameters |
|---|---|---|---|
| GET | /vsphone/api/padApi/stsToken | Get SDK temporary token | - |
| POST | /vsphone/api/padApi/stsTokenByPadCode | Get SDK temporary token by padCode | padCode |
| POST | /vsphone/api/padApi/clearStsToken | Clear SDK authorization token | token |
Callback Events
| Event Code | Description |
|---|---|
| 999 | Instance status callback |
| 1000 | Instance restart task |
| 1001 | Instance reset task |
| 1002 | Async ADB task |
| 1003 | App install task |
| 1004 | App uninstall task |
| 1005 | App stop task |
| 1006 | App restart task |
| 1007 | App start task |
| 1009 | Instance file upload task |
| 1012 | Instance upgrade image task |
| 1124 | One-key new device |
| 4001 | User image upload |
Details and examples see callback.md
Common Error Codes
| Error Code | Description |
|---|---|
| 200 | Success |
| 2031 | Invalid key |
| 2032 | Missing Authorization header |
| 2019 | Signature verification failed |
| 100000 | Invalid request parameters |
| 100003 | Missing Authorization header |
| 100004 | Invalid signature |
| 100005 | Signature verification failed |
| 110028 | Instance not found |
| 110013 | Instance not found |
| 110031 | Instance not ready |
| 120008 | Token not owned by current user |
More error codes see ErrorCode.md
Usage Tips
Auth security
- Keep AK/SK secure, do not hardcode in client
- Rotate keys periodically
Async tasks
- Restart, reset, install, upload etc. are async
- Configure callback or poll task detail API for result
Batch limits
- Batch APIs have limits (e.g. 200 instances)
- Batch requests and handle failure list
Instance state
- Some operations require instance online/ready
- Check instance state before calling
Modification props and restart
- Modifying Android modification props, SIM etc. requires restart
- Differs from "modify instance properties" (dynamic)
Related Docs
- Full API doc — Full API reference
- Getting Started — Auth and signing
- Error codes — Error code details
- Callback types and examples — Callback events
- Instance list fields — Instance properties
- Android modification props — Modification parameters
Doc version: Quick reference Content subject to OpenAPI.md