Introduction
Welcome to the official reference of ADVANCE Open API for commercial integration!
ADVANCE offers unique anti-fraud solutions by giving our clients an adaptable tool to deal with the persistently evolving problems that volatile fraudsters impose, with our distinctive machine learning models, coupled with experience in guiding industry giants, our world-class team of data scientists will procure meticulously tailored analysis for each business.
To get started please check our Glossary and Integration Steps to understand how ADVANCE Open API works before proceeding with any of our API documentation.
Glossary
Welcome to Glossary!
Please read this part to understand how ADVANCE API system works to ensure smooth integration. We will explain all the basics you need to know about our API. For integration steps, please check Integration Steps.
Status Code
- Each one of our API response will have Status Code, that will tell you about the result of the API call, whether its a success, fail or there are some error during the process
- Our system will charge your API usage based on the response status code, each Status Code listed in our API document will have
either
freeorpayflag on them freemeans you will not be charged if the API response contains the said status codepaymeans you will be charged if the API response contains the said status code- Each API will have their own special Status code that can only be found on that API response
- They will also have the same
payorfreeflag on them. To determine whether you will be charged or not for your usage - Below here are the commonly used Status Codes, these status code could appear in all of our API responses, so please remember to add a handler for these Status Codes as well
| Status Code | Message |
|---|---|
SUCCESS |
pay OK |
ERROR |
free Server error |
NO_AUTHORIZATION |
free API authorization failed |
API_ACCESS_DENIED |
free API not found or you have no access to API |
EMPTY_PARAMETER_ERROR |
free Parameter should not be empty |
INSUFFICIENT_BALANCE |
free Insufficient balance in your account please recharge your account |
SERVICE_BUSY |
free The service is busy, please query later |
QUERY_LIMIT_REACHED |
free Free query limit is reached, please query later |
Request URL & Parameters
- Request URL can be found at each API document along with the request method (
POSTorGETor other request method) and Content Type (application/jsonor other content type) - Some parameters will have
optionaltag on them, this means the parameter is not mandatory for the request and they can be empty, however adding them might produce more accurate result, for example : Company check, zip code is an optional parameter but adding zip code parameter will return all the companies around that said zip code instead of all around Indonesia. - If a parameter does not have an
optionaltag, it means the parameter is mandatory and making request without them will returnEMPTY_PARAMETER_ERRORresponse - Every parameter has a data type such as
string,integerandfile, please double check the parameter data type before making any request - Here’s an example of parameter explanation that can be found on each API document
| Parameter | Description |
|---|---|
| requestString | string String value for API request |
| requestFile | file Request file for API request |
| requestInteger | optional integer Number value for API request |
Response
- ADVANCE API will give response in
JSONformat - ADVANCE API response will consist of 4 fields,
codewhich is the status code that has been explained beforehand,messagewhich is the status code detailed explanation,extrawhich is an exception message (should be empty most of the time) anddatawhich is the response content from ADVANCE - Every service will have a different
dataformat, therefore please check the related API document - If the response format is very complicated (multiple different JSON object, nested JSON object), please check the Breakdown part of the response explanation
- Here’s an example of Response explanation that can be found on each API document
| Parameter | Description |
|---|---|
| code | API Status Code |
| message | Status Code Explanation |
| data | field1: explanation of first information that will be returned from ADVANCE |
field2: explanation of Second information that will be returned from ADVANCE |
|
| extra | Extra response info (Exception Message) |
Image Quality Requirements
- Since these services checks the uploaded image and extract the necessary information out of them, the uploaded image quality has to be above our image standard for them to work properly.
- Therefore please ensure that the uploaded image pass the following requirements:
- Is in one of the following image formats: PNG / JPG / JPEG
- Below 2 MB file size
- Minimum resolution of 256 x 256
- Maximum resolution of 4096 x 4096
- And for OCR image please also make sure that the uploaded image satisfy the following criteria:
- ID Card’s ratio in the uploaded photo is not so small that the words in the ID Card are unreadable
- ID Card’s position is in Vertical or Horizontal position and NOT heavily tilted (around 45 degree)
- Nothing is covering up the words in the ID Card (ex: Lamp Light, Dirt, Ink, Shadow, etc)
- Have a Clean background (No words or other picture in the backgroud)
Library
- All the required libraries can be downloaded Here
Integration Steps
Assuming you already understand the basic of how our API works (in case you haven’t please check our Glossary), now we will help you through the integration.
- First of all please contact ADVANCE to get your test account, the test account should only be used for integration, as we limit the service usage of these account to 5000 requests. If you want to do a batch test, please contact us.
- Download all the necessary libraries at Here
- Integrate services according to the related service’s API document below. We provide sample code, and also sample request and response format on the right side.
- The integration should be done in two months, otherwise we will terminate the test account, if you want to use our service at your production environment, please contact us and request for an official account.
- We will not limit your service usage on the official account, however, you will be charged for the service usage (again, according to the response status code).
That’s all the integration steps! If you encounter any technical problem during the integration, please feel free to contact our team and we will reach to you ASAP.
Device Info SDK-API
We are currently developing this product, It will be available soon. So, Stay Tuned! Please contact us if you want to be notified when the product is available!
Request Example:
{
"blackBoxId":"7fd3fc73-3734-46f3-9b96-f27f8df003e6"
}
Code Sample
import ai.advance.sdk.client.OpenApiClient;
public class SomeClass{
public void demoDeviceInfo(){
//Replace the ACCESS_KEY & SECRET_KEY parameters with your own access key and secret key
OpenApiClient client = new OpenApiClient("https://api.advance.ai", ACCESS_KEY, SECRET_KEY);
// params
Map<String, String> params = new HashMap<>();
params.put("blackBoxId","7fd3fc73-3734-46f3-9b96-f27f8df003e6");
// call request
String response = client.request(
"/openapi/devinfo/v1/get-fingerprint", JSON.toJSONString(params));
// Add code to process the response result
}
}
<?php
include_once PATH_TO_SDK;
$api_host = 'https://api.advance.ai';
$api_name = '/openapi/devinfo/v1/get-fingerprint';
$access_key = 'ACCESS_KEY'; // your access key
$secret_key = 'SECRET_KEY'; // your secret key
$params = array(
'blackBoxId' -> '7fd3fc73-3734-46f3-9b96-f27f8df003e6'
);
$client = new ai\advance\CurlClient($api_host, $access_key, $secret_key);
$result = $client -> request($api_name, $params);
echo $result . "\n";
?>
IMPORTANT
Before using this service, there are few things you need to know:
- First of all you need to integrate our SDK into your mobile app (Please contact us to get this SDK)
- Our SDK will be able to get some device data from the mobile device of the users that’s using your app
- For each mobile device info we got from your user, we will give you a “blackBoxId”, which you can use to query the device info through this API.
Request Url:
https://api.advance.ai/openapi/devinfo/v1/get-fingerprint
POST (application/json)
Request Parameters:
| Parameters Name | Description |
|---|---|
blackBoxId |
string An Identifier for each Mobile Device info we get from your user through the SDK |
Response Result:
{
"code": "SUCCESS",
"message": "OK",
"data": {
"isEmulator": false,
"dnsAddress": [
"8.8.8.8",
"114.114.114.114"
],
"allowMockLocation": false,
"release": "7.0",
"radioVersion": "953_GEN_PACK-1.131064.1.132236.1",
"cpuFrequencies": [
{
"maxFreq": "2016000",
"minFreq": "652800",
"curFreq": "2016000"
},
{
"maxFreq": "2016000",
"minFreq": "652800",
"curFreq": "2016000"
}
],
"mcc": 0,
"deviceId": "866334036394282",
"deviceName": "mido",
"radio": "unknown",
"freeRam": "655.8 MB",
"fingerprint": "xiaomi/mido/mido:7.0/NRD90M/V9.5.1.0.NCFCNFA:user/release-keys",
"host": "c3-miui-ota-bd01.bj",
"model": "Redmi Note 4X",
"cpuHardware": {
"BogoMIPS": "38.40",
"Processor": "AArch64 Processor rev 4 (aarch64)",
"CPU implementer": "0x41",
"CPU architecture": "8",
"CPU variant": "0x0",
"CPU revision": "4",
"Hardware": "Qualcomm Technologies, Inc MSM8953",
"Features": "fp asimd evtstrm aes pmull sha1 sha2 crc32",
"processor": "7",
"CPU part": "0xd03"
},
"id": "NRD90M",
"baseBandVersion": "953_GEN_PACK-1.131064.1.132236.1",
"brand": "xiaomi",
"androidId": "b8b93980786a4002",
"apkMd5": "36feca3cc3a8c48702d4fba3c35f7d5e",
"buildVersion": 24,
"netInterface": null,
"totalExternal": "23.5 GB",
"bootTime": 365232351,
"buildTime": 1519467608000,
"activeTime": 365232351,
"colorMode": null,
"timeZone": "Asia/Shanghai",
"touchscreen": 3,
"tags": "release-keys",
"currentTime": 1530848383554,
"totalInternal": "23.5 GB",
"networkInfo": {
"netInterface": [
{
"isUp": false,
"displayName": "sit0",
"interfaceAddresses": "[]",
"isLoopback": false,
"index": 3,
"isVirtual": false,
"isPointToPoint": false,
"mtu": 1480
},
{
"isUp": true,
"inetAddress": "192.168.2.13",
"displayName": "wlan0",
"interfaceAddresses": "[192.168.2.13, fe80::f6f5:dbff:fe0e:553b%wlan0]",
"isLoopback": false,
"index": 22,
"isVirtual": false,
"vpnAddress": "192.168.2.13",
"isPointToPoint": false,
"mtu": 1500
}
],
"isUsingVpn": true,
"dnses": "[8.8.8.8]",
"httpProxy": {
"exclusionList": "",
"port": 8888,
"pacFileUrl": {
"path": {
"decoded": "",
"pathSegments": null,
"encoded": ""
},
"ssp": null,
"userInfo": null,
"fragment": {
"decoded": null,
"encoded": null
},
"scheme": null,
"port": -2,
"authority": {
"decoded": null,
"encoded": null
},
"query": {
"decoded": null,
"encoded": null
},
"uriString": "",
"host": "NOT CACHED"
},
"host": "192.168.2.160"
},
"linkAddresses": [
"26.26.26.1/24"
],
"bssid": "48:bd:3d:65:b9:a0",
"dns2": "8.8.8.8",
"dns1": "114.114.114.114",
"serverAddress": "192.168.2.1",
"ipAddress": "192.168.2.13",
"domains": "",
"ssid": "advance",
"leaseDuration": 86400,
"macAddress": "02:00:00:00:00:00",
"netmask": "255.255.255.0",
"blueMac": "F4:F5:DB:4E:55:3C",
"interfaceName": "tun0",
"dnsServers": "[8.8.8.8]",
"gateway": "192.168.2.1"
},
"kernelVersion": "Linux version 3.18.31-perf-g1c5c278 ([email protected]) (gcc version 4.9 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Sat Feb 24 19:11:05 CST 2018\n",
"apkVersionCode": 1,
"freeInternal": "16.3 GB",
"freeExternal": "16.3 GB",
"cpuType": "qcom",
"securityPatch": "2018-01-01",
"uiMode": 17,
"cellLocation": [
{
"psc": 248,
"mnc": 1,
"asuLevel": 15,
"level": 4,
"mcc": 460,
"type": "WCDMA",
"dbm": -83,
"cid": 7425479,
"lac": 41075
},
{
"psc": 406,
"mnc": 2147483647,
"asuLevel": 13,
"level": 4,
"mcc": 2147483647,
"type": "WCDMA",
"dbm": -87,
"cid": 2147483647,
"lac": 2147483647
}
],
"psInfo": "USER PID PPID VSIZE RSS WCHAN PC NAME\nu0_a875 1053 31118 9096 1624 0 7f79477040 R ps\nu0_a875 31118 726 1711828 72844 SyS_epoll_ 7fa9490500 S com.mobile.data",
"locale": "zh_CN",
"isRooted": false,
"batteryInfo": {
"chargerPlugged": "USB",
"batteryPercent": 100,
"temperature": 33,
"health": "GOOD",
"isCharging": true,
"technology": "Li-poly",
"voltage": 4364
},
"manufacturer": "Xiaomi",
"telephonyInfo": [
{
"networkCountryIso": "",
"phoneType": 1,
"simCountryIso": "",
"mmsUserAgent": "Android-Mms/2.0",
"voiceMailNumber": null,
"networkOperator": "",
"simSerialNumber": null,
"dataState": 0,
"imsi": null,
"deviceSoftwareVersion": "00",
"voiceMailAlphaTag": "语音信箱",
"callState": 0,
"number": null,
"simOperator": "",
"imei": "866334036394282",
"simOperatorName": "",
"mmsUAProfUrl": "http://www.google.com/oha/rdf/ua-profile-kila.xml",
"networkType": 0,
"dataActivity": 0,
"groupIdLevel1": null,
"radioType": "unknown",
"networkOperatorName": ""
},
{
"networkCountryIso": "",
"phoneType": 1,
"simCountryIso": "",
"mmsUserAgent": "Android-Mms/2.0",
"voiceMailNumber": null,
"networkOperator": "",
"simSerialNumber": null,
"dataState": 0,
"imsi": null,
"deviceSoftwareVersion": "00",
"voiceMailAlphaTag": "语音信箱",
"callState": 0,
"number": null,
"simOperator": "",
"imei": "866334036394290",
"simOperatorName": "",
"mmsUAProfUrl": "http://www.google.com/oha/rdf/ua-profile-kila.xml",
"networkType": 0,
"phoneCount": 2,
"dataActivity": 0,
"groupIdLevel1": null,
"radioType": "unknown",
"networkOperatorName": ""
}
],
"isScreenHdr": null,
"apkVersionName": "1.0",
"baseOs": "",
"bootloader": "unknown",
"isScreenWideColorGamut": null,
"codeName": "REL",
"packageName": "com.mobile.data",
"screenRes": "1920x1080",
"collectTime": "382 ms",
"keyboard": 1,
"product": "mido",
"mnc": 0,
"os": "android",
"abi2": "",
"display": "AL1512-mido-build-20180224182010",
"abi": "arm64-v8a",
"incremental": "V9.5.1.0.NCFCNFA",
"totalRam": "2.8 GB",
"dfpVersion": "v1.0.0",
"upTime": 579854519,
"gpsLocation": {},
"locales": "zh-CN",
"brightness": 102,
"hardKeyboardHidden": 2,
"serial": "cccd68520004",
"signMd5": "566ceafef2c645ca1657112b26b4a833",
"previewSdkInt": 0,
"user": "builder"
},
"extra": null
}
Response Description:
| Parameter | Description |
|---|---|
code |
Device Fingerprint Service Status Code |
message |
Message returned from server |
extra |
Extra response info such as exception message |
data |
Device Info |
Response Code
| Status Code | Message |
|---|---|
ERR_DEVINFO_BLACKBOXID_ERROR |
free BlackBoxId not found |
Note:Don’t forget to add handler for these Status Codes in Glossary
Mobile Info SDK-API
We are currently developing this product, It will be available soon. So, Stay Tuned! Please contact us if you want to be notified when the product is available!
Request Example:
{
"blackBoxId":"7fd3fc73-3734-46f3-9b96-f27f8df003e6"
}
Code Sample
import ai.advance.sdk.client.OpenApiClient;
public class SomeClass{
public void demoDeviceInfo(){
//Replace the ACCESS_KEY & SECRET_KEY parameters with your own access key and secret key
OpenApiClient client = new OpenApiClient("https://api.advance.ai", ACCESS_KEY, SECRET_KEY);
// params
Map<String, String> params = new HashMap<>();
params.put("blackBoxId","7fd3fc73-3734-46f3-9b96-f27f8df003e6");
// call request
String response = client.request(
"/openapi/devinfo/v1/custom-info", JSON.toJSONString(params));
// Add code to process the response result
}
}
<?php
include_once PATH_TO_SDK;
$api_host = 'https://api.advance.ai';
$api_name = '/openapi/devinfo/v1/custom-info';
$access_key = 'ACCESS_KEY'; // your access key
$secret_key = 'SECRET_KEY'; // your secret key
$params = array(
'blackBoxId' -> '7fd3fc73-3734-46f3-9b96-f27f8df003e6'
);
$client = new ai\advance\CurlClient($api_host, $access_key, $secret_key);
$result = $client -> request($api_name, $params);
echo $result . "\n";
?>
IMPORTANT
Before using this service, there are few things you need to know:
- First of all you need to integrate our SDK into your mobile app (Please contact us to get this SDK)
- Our SDK will be able to get some device data from the mobile device of the users that’s using your app
- For each mobile device info we got from your user, we will give you a “blackBoxId”, which you can use to query the device info & telecommunication through this API.
Request Url:
https://api.advance.ai/openapi/devinfo/v1/custom-info
POST (application/json)
Request Parameters:
| Parameters Name | Description |
|---|---|
blackBoxId |
string An Identifier for each Mobile Device info we get from your user through the SDK |
Response Result:
{
"code": "SUCCESS",
"message": "OK",
"data": {
"call": [
{
"date": "1520494378486",
"duration": "31",
"is_read": null,
"number": "053******459",
"name": null,
"type": "1"
},
{
"date": "1525682965231",
"duration": "0",
"is_read": null,
"number": "10010",
"name": null,
"type": "2"
}
],
"contact": {
"contactEmail": [
{
"data1": "[email protected]",
"contact_id": "4"
}
],
"contact": [
{
"send_to_voicemail": "0",
"last_time_contacted": "1508233170525",
"contact_status_ts": null,
"custom_ringtone": null,
"photo_id": null,
"contact_status": null,
"display_name": "寿*",
"in_visible_group": "1",
"starred": "0",
"is_user_profile": "0",
"times_contacted": "1",
"has_phone_number": "1",
"_id": "1"
},
{
"send_to_voicemail": "0",
"last_time_contacted": "1512029750371",
"contact_status_ts": null,
"custom_ringtone": null,
"photo_id": null,
"contact_status": null,
"display_name": "张*",
"in_visible_group": "1",
"starred": "0",
"is_user_profile": "0",
"times_contacted": "1",
"has_phone_number": "1",
"_id": "4"
}
],
"contactGroup": [
{
"favorites": "0",
"account_type": "com.google",
"notes": null,
"deleted": "0",
"auto_add": "1",
"account_name": "[email protected]",
"should_sync": "1",
"_id": "1",
"title": "My Contacts",
"group_visible": "1",
"group_is_read_only": "1"
},
{
"favorites": "0",
"account_type": "com.xiaomi",
"notes": null,
"deleted": "0",
"auto_add": "0",
"account_name": "140257855",
"should_sync": "1",
"_id": "4",
"title": "contact group test",
"group_visible": "0",
"group_is_read_only": "0"
}
],
"contactAddress": [
{
"data8": null,
"data7": null,
"starred": "0",
"data1": "address",
"data10": null,
"contact_id": "4",
"display_name": "张*"
}
],
"contactPhone": [
{
"data1": "+86 *** **** **20",
"display_name": "寿*",
"contact_id": "1"
},
{
"data1": "31******79",
"display_name": "孙*",
"contact_id": "4"
}
]
},
"sms": [
{
"date": "1524289686490",
"address": null,
"read": "1",
"date_sent": "0",
"person": null,
"subject": null,
"body": "hello world",
"type": "3",
"seen": "0",
"status": "-1"
}
],
"deviceInfo": {
"isEmulator": false,
"dnsAddress": [
"8.8.8.8",
"114.114.114.114"
],
"allowMockLocation": false,
"release": "7.0",
"radioVersion": "953_GEN_PACK-1.131064.1.132236.1",
"cpuFrequencies": [
{
"maxFreq": "2016000",
"minFreq": "652800",
"curFreq": "2016000"
},
{
"maxFreq": "2016000",
"minFreq": "652800",
"curFreq": "2016000"
}
],
"mcc": 0,
"deviceId": "866334036394282",
"deviceName": "mido",
"radio": "unknown",
"freeRam": "655.8 MB",
"fingerprint": "xiaomi/mido/mido:7.0/NRD90M/V9.5.1.0.NCFCNFA:user/release-keys",
"host": "c3-miui-ota-bd01.bj",
"model": "Redmi Note 4X",
"cpuHardware": {
"BogoMIPS": "38.40",
"Processor": "AArch64 Processor rev 4 (aarch64)",
"CPU implementer": "0x41",
"CPU architecture": "8",
"CPU variant": "0x0",
"CPU revision": "4",
"Hardware": "Qualcomm Technologies, Inc MSM8953",
"Features": "fp asimd evtstrm aes pmull sha1 sha2 crc32",
"processor": "7",
"CPU part": "0xd03"
},
"id": "NRD90M",
"baseBandVersion": "953_GEN_PACK-1.131064.1.132236.1",
"brand": "xiaomi",
"androidId": "b8b93980786a4002",
"apkMd5": "36feca3cc3a8c48702d4fba3c35f7d5e",
"buildVersion": 24,
"netInterface": null,
"totalExternal": "23.5 GB",
"bootTime": 365232351,
"buildTime": 1519467608000,
"activeTime": 365232351,
"colorMode": null,
"timeZone": "Asia/Shanghai",
"touchscreen": 3,
"tags": "release-keys",
"currentTime": 1530848383554,
"totalInternal": "23.5 GB",
"networkInfo": {
"netInterface": [
{
"isUp": false,
"displayName": "sit0",
"interfaceAddresses": "[]",
"isLoopback": false,
"index": 3,
"isVirtual": false,
"isPointToPoint": false,
"mtu": 1480
},
{
"isUp": true,
"inetAddress": "192.168.2.13",
"displayName": "wlan0",
"interfaceAddresses": "[192.168.2.13, fe80::f6f5:dbff:fe0e:553b%wlan0]",
"isLoopback": false,
"index": 22,
"isVirtual": false,
"vpnAddress": "192.168.2.13",
"isPointToPoint": false,
"mtu": 1500
}
],
"isUsingVpn": true,
"dnses": "[8.8.8.8]",
"httpProxy": {
"exclusionList": "",
"port": 8888,
"pacFileUrl": {
"path": {
"decoded": "",
"pathSegments": null,
"encoded": ""
},
"ssp": null,
"userInfo": null,
"fragment": {
"decoded": null,
"encoded": null
},
"scheme": null,
"port": -2,
"authority": {
"decoded": null,
"encoded": null
},
"query": {
"decoded": null,
"encoded": null
},
"uriString": "",
"host": "NOT CACHED"
},
"host": "192.168.2.160"
},
"linkAddresses": [
"26.26.26.1/24"
],
"bssid": "48:bd:3d:65:b9:a0",
"dns2": "8.8.8.8",
"dns1": "114.114.114.114",
"serverAddress": "192.168.2.1",
"ipAddress": "192.168.2.13",
"domains": "",
"ssid": "advance",
"leaseDuration": 86400,
"macAddress": "02:00:00:00:00:00",
"netmask": "255.255.255.0",
"blueMac": "F4:F5:DB:4E:55:3C",
"interfaceName": "tun0",
"dnsServers": "[8.8.8.8]",
"gateway": "192.168.2.1"
},
"kernelVersion": "Linux version 3.18.31-perf-g1c5c278 ([email protected]) (gcc version 4.9 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Sat Feb 24 19:11:05 CST 2018\n",
"apkVersionCode": 1,
"freeInternal": "16.3 GB",
"freeExternal": "16.3 GB",
"cpuType": "qcom",
"securityPatch": "2018-01-01",
"uiMode": 17,
"cellLocation": [
{
"psc": 248,
"mnc": 1,
"asuLevel": 15,
"level": 4,
"mcc": 460,
"type": "WCDMA",
"dbm": -83,
"cid": 7425479,
"lac": 41075
},
{
"psc": 248,
"mnc": 2147483647,
"asuLevel": 13,
"level": 4,
"mcc": 2147483647,
"type": "WCDMA",
"dbm": -87,
"cid": 2147483647,
"lac": 2147483647
}
],
"psInfo": "USER PID PPID VSIZE RSS WCHAN PC NAME\nu0_a875 1053 31118 9096 1624 0 7f79477040 R ps\nu0_a875 31118 726 1711828 72844 SyS_epoll_ 7fa9490500 S com.mobile.data",
"locale": "zh_CN",
"isRooted": false,
"batteryInfo": {
"chargerPlugged": "USB",
"batteryPercent": 100,
"temperature": 33,
"health": "GOOD",
"isCharging": true,
"technology": "Li-poly",
"voltage": 4364
},
"manufacturer": "Xiaomi",
"telephonyInfo": [
{
"networkCountryIso": "",
"phoneType": 1,
"simCountryIso": "",
"mmsUserAgent": "Android-Mms/2.0",
"voiceMailNumber": null,
"networkOperator": "",
"simSerialNumber": null,
"dataState": 0,
"imsi": null,
"deviceSoftwareVersion": "00",
"voiceMailAlphaTag": "语音信箱",
"callState": 0,
"number": null,
"simOperator": "",
"imei": "866334036394282",
"simOperatorName": "",
"mmsUAProfUrl": "http://www.google.com/oha/rdf/ua-profile-kila.xml",
"networkType": 0,
"dataActivity": 0,
"groupIdLevel1": null,
"radioType": "unknown",
"networkOperatorName": ""
},
{
"networkCountryIso": "",
"phoneType": 1,
"simCountryIso": "",
"mmsUserAgent": "Android-Mms/2.0",
"voiceMailNumber": null,
"networkOperator": "",
"simSerialNumber": null,
"dataState": 0,
"imsi": null,
"deviceSoftwareVersion": "00",
"voiceMailAlphaTag": "语音信箱",
"callState": 0,
"number": null,
"simOperator": "",
"imei": "866334036394290",
"simOperatorName": "",
"mmsUAProfUrl": "http://www.google.com/oha/rdf/ua-profile-kila.xml",
"networkType": 0,
"phoneCount": 2,
"dataActivity": 0,
"groupIdLevel1": null,
"radioType": "unknown",
"networkOperatorName": ""
}
],
"isScreenHdr": null,
"apkVersionName": "1.0",
"baseOs": "",
"bootloader": "unknown",
"isScreenWideColorGamut": null,
"codeName": "REL",
"packageName": "com.mobile.data",
"screenRes": "1920x1080",
"collectTime": "382 ms",
"keyboard": 1,
"product": "mido",
"mnc": 0,
"os": "android",
"abi2": "",
"display": "AL1512-mido-build-20180224182010",
"abi": "arm64-v8a",
"incremental": "V9.5.1.0.NCFCNFA",
"totalRam": "2.8 GB",
"dfpVersion": "v1.0.0",
"upTime": 579854519,
"gpsLocation": {},
"locales": "zh-CN",
"brightness": 102,
"hardKeyboardHidden": 2,
"serial": "cccd68520004",
"signMd5": "566ceafef2c645ca1657112b26b4a833",
"previewSdkInt": 0,
"user": "builder"
}
},
"extra": null
}
Response Description:
| Parameter | Description |
|---|---|
code |
Device & Telecommunication Data Service Status Code |
message |
Message returned from server |
extra |
Extra response info such as exception message |
data |
Device Info & Telecommunication Info |
Response Code
| Status Code | Message |
|---|---|
ERR_DEVINFO_BLACKBOXID_ERROR |
free BlackBoxId not found |
Note:Don’t forget to add handler for these Status Codes in Glossary
Libraries
Integration Example:
import ai.advance.sdk.client.OpenApiClient;
public class IntegrationDemo{
public void demoDeviceInfo(){
OpenApiClient client = new OpenApiClient("https://api.advance.ai", "{your access_key}", "{your secret_key}");
Map<String, String> params = new HashMap<>();
params.put("blackBoxId","7fd3fc73-3734-46f3-9b96-f27f8df003e6");
// call request
String response = client.request("/openapi/devinfo/v1/get-fingerprint", JSON.toJSONString(params));
// do something with response ...
}
}
<?php
include_once PATH_TO_SDK;
$api_host = 'https://api.advance.ai';
$api_name = '/openapi/devinfo/v1/get-fingerprint';
$access_key = '{ACCESS_KEY}'; // your access key
$secret_key = '{SECRET_KEY}'; // your secret key
$params = array(
'blackBoxId' -> '7fd3fc73-3734-46f3-9b96-f27f8df003e6'
);
$client = new ai\advance\CurlClient($api_host, $access_key, $secret_key);
$result = $client -> request($api_name, $params);
echo $result . "\n";
?>
Open API SDK:
Download Link (Java): Click Here Download Link (Php): Click Here Download Link (Python): Click Here
Note for PHP SDK :
- If you receive no response from your request, please check client -> requestError
- If you receive something similar to this message: “SSL certificate : unable to get local issuer certificate”, that means there’s problem with SSL certificate installation, for solution please refer to this article right here
Note for Timeout Settings:
- Read Timeout default value is 60 second
- Connect Timeout default is 5 second
- The timeout value can be configure to suits your need
Here’s an example of how change the timeout settings:
Java
OpenApiClient client = new OpenApiClient("apiHost","accessKey","secretKey");
client.setConnTimeout(5000); //in milisecond
client.setReadTimeout(60000); //in milisecond
- PHP:
$client->setTimeout(5,60); # in second measurement unit
- Python
client.set_timeout(20) #second measurement unit