
| 接口编号: 516 | 接口名称: 手机号实名认证二要素 | 连接应用: 2530个 |
| 应用编号: 516002 | 应用标识: rna.telco_tef2 | 服务商: NowAPI |
说明
三网运营商移动、联通、电信手机号码实名认证二要素验证接口,效验手机号码+身份证号码是否真实一致,直连权威渠道,无缓存,准确率99.99%。 实名认证相关接口 手机号实名认证二要素效验(手机号码+姓名) 手机号实名认证二要素效验(手机号码+身份证号码) 手机号实名认证三要素效验(手机号码+姓名+身份证号码) 手机号在网时长 手机号在网状态 身份证实名认证二要素效验(身份证号码+姓名)
请求网址
https://sapi.k780.com
请求方式
GET/POST
请求Header
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
请求参数
| 参数 | 类型 | 是否必须 | 备注 |
|---|---|---|---|
| app | string | 是 | 固定 rna.telco_tef1 |
| rnaTel | string | 是 | 国内手机号码
(暂不支持虚拟运营商162、167、170号段.) |
| rnaIdcard | string | 是 | 身份证号码 |
| appkey | string | 是 | 使用API的唯一凭证 获取 |
| sign | string | 是 | md5后的32位密文,登陆用. 获取 |
| format | string | 否 | json |
Json请求示例
https://sapi.k780.com/?app=rna.telco_tef2&rnaTel=手机号码&rnaIdcard=身份证号码&appkey=APPKEY&sign=SIGN&format=json
Json返回示例
成功响应
{
success: "1",
result: {
rnaType: "TEF1",
rnaCode: "01",
rnaDesc: "验证通过",
telAttribution: "中国,广东,中山",
telOperators: "中国电信",
telAreaCode: "0760",
telPostCode: "528400"
}
}
系统级别错误(无数据/处理异常等)
{
"success":"0",
"msgid":"...",
"msg":"..."
}
rnaCode 说明
| 返回码 | 说明 | - |
| 01 | 验证通过 | - |
| 02 | 验证不通过 | - |
| 11 | 无法验证 | - |
| 13 | 查无信息 | - |
示例代码
<?php
header("Content-Type:text/html;charset=UTF-8");
function nowapiRequest($postData,&$errMsg=''){
$apiUrl = 'https://sapi.k780.com/';
$useContext = stream_context_create(array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type:application/x-www-form-urlencoded',
'content' => http_build_query($postData)
)
));
if(!$resData=file_get_contents($apiUrl,false,$useContext)){
$errMsg = 'ERR_CONNECT';
return false;
}
if(!$arrData=json_decode($resData,true)){
$errMsg = 'ERR_DECODE';
return false;
}
if($arrData['success']!=1){
$errMsg = $arrData['msgid'].' '.$arrData['msg'];
return false;
}
return $arrData['result'];
}
$postData['app'] = 'rna.telco_tef2';
$postData['rnaTel'] = '手机号码';
$postData['rnaIdcard'] = '身份证号码';
$postData['appkey'] = '10003';//替换成自己的appkey
$postData['sign'] = 'b59bc3ef6191eb9f747dd4e83c99f2a4';//替换成自己的sign
$postData['format'] = 'json';
$result = nowapiRequest($postData,$errMsg);
print_r($errMsg);
print_r($result);
#python
import json,urllib
from urllib import urlencode
url = 'http://api.k780.com'
params = {
'app' : 'rna.telco_tef2',
'rnaTel' : '手机号码',
'rnaIdcard' : '身份证号码',
'appkey' : 'APPKEY',
'sign' : 'SIGN',
'format' : 'json',
}
params = urlencode(params)
f = urllib.urlopen('%s?%s' % (url, params))
nowapi_call = f.read()
#print content
a_result = json.loads(nowapi_call)
if a_result:
if a_result['success'] != '0':
print a_result['result'];
else:
print a_result['msgid']+' '+a_result['msg']
else:
print 'Request nowapi fail.';
import java.net.*;
import java.io.*;
public class test{
public static void main(String args[]) throws Exception {
URL u=new URL("https://sapi.k780.com/?app=rna.telco_tef2&rnaTel=手机号码&rnaIdcard=身份证号码&appkey=APPKEY&sign=SIGN&format=json");
InputStream in=u.openStream();
ByteArrayOutputStream out=new ByteArrayOutputStream();
try {
byte buf[]=new byte[1024];
int read = 0;
while ((read = in.read(buf)) > 0) {
out.write(buf, 0, read);
}
} finally {
if (in != null) {
in.close();
}
}
byte b[]=out.toByteArray( );
System.out.println(new String(b,"utf-8"));
}
}
curl "https://sapi.k780.com/?app=rna.telco_tef2&rnaTel=手机号码&rnaIdcard=身份证号码&appkey=10003&sign=b59bc3ef6191eb9f747dd4e83c99f2a4&format=json"
流量包套餐说明:
买多少用多少,多买有优惠,10元起买,适合大多数应用场景.
| 规格 | 套餐名称 | 价格 | 描述 |
|---|---|---|---|
| 201 | 流量包 20 次 | 10 元 | 约 0.49 元/次 |
| 202 | 流量包 882 次 | 388 元 | 约 0.44 元/次 |
| 203 | 流量包 4476 次 | 1880 元 | 约 0.42 元/次 |
| 204 | 流量包 9949 次 | 3880 元 | 约 0.39 元/次 |
| 205 | 流量包 27444 次 | 9880 元 | 约 0.36 元/次 |