Mobile 3-Factor Verification
Checks in real time through telecom carriers whether the mobile number, name and ID number match, with number-portability detection. For scenarios that need higher verification confidence. Billed per package, 1 deduction per call.
API info
| Item | Value |
|---|
| Endpoint | POST /api/v3/iponesys |
| Billing | Package |
Request parameters
| Parameter | Type | Required | Description |
|---|
name | string | Yes | Name |
phone | string | Yes | Mobile number |
idcard | string | Yes | ID card number |
Request example
PHP
<?php
$app_id = 'YOUR_APP_ID';
$app_key = 'YOUR_APP_KEY';
$url = 'https://yunsapi.com/api/v3/iponesys';
$params = [
'name' => 'Zhang San',
'phone' => '13800138000',
'idcard' => '330106199202153388',
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'X-APP-ID: ' . $app_id,
'X-APP-KEY: ' . $app_key,
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$resp = curl_exec($ch);
curl_close($ch);
echo $resp;
Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class MobileDemo {
public static void main(String[] args) throws Exception {
String appId = "YOUR_APP_ID";
String appKey = "YOUR_APP_KEY";
String url = "https://yunsapi.com/api/v3/iponesys";
String body = "{\"name\":\"Zhang San\",\"phone\":\"13800138000\",\"idcard\":\"330106199202153388\"}";
HttpClient client = HttpClient.newHttpClient();
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("X-APP-ID", appId)
.header("X-APP-KEY", appKey)
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> resp = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(resp.body());
}
}
Response example
{
"code": 0,
"msg": "success",
"data": {
"state": "1",
"is_xhzw": "0",
"old_yys": "China Mobile",
"new_yys": "China Mobile",
"remain": 9
},
"request_id": "req_xxx"
}
Response parameters
| Parameter | Type | Description |
|---|
data.state | string | 1 means all three factors match, 0 means mismatch |
data.is_xhzw | string | Whether the number was ported, 1 yes, 0 no |
data.old_yys | string | Previous carrier |
data.new_yys | string | Current carrier |
data.remain | integer | Remaining quota in the package |