产品详情
API参数 云鉴_运营商手机在网时长_手机号在网时长_三网手机入网时长_三网合一 调用地址: http,https://online.api.bdymkt.com/online 请求方式: POST 支持格式: application/x-www-form-urlencoded 调用工具: 去调试 请求参数(Headers) 请求参数(Query) 请求参数(Body)
- 名称
- 类型
- 是否必须
- 示例值
- 描述
- mobile
- string
- true
- 17688156155
- 手机号
<dependency>
<groupId>com.baidubce</groupId>
<artifactId>api-explorer-sdk</artifactId>
<version>1.0.0</version>
</dependency>
import com.baidubce.http.ApiExplorerClient;
import com.baidubce.http.AppSigner;
import com.baidubce.http.HttpMethodName;
import com.baidubce.model.ApiExplorerRequest;
import com.baidubce.model.ApiExplorerResponse;
// 云鉴_运营商手机在网时长_手机号在网时长_三网手机入网时长_三网合一 Java示例代码
public class RequestDemo {
public static void main(String[] args) {
String path = "http://gwgp-pwqxu9pnmq3.n.bdcloudapi.com/online";
ApiExplorerRequest request = new ApiExplorerRequest(HttpMethodName.POST, path);
request.setCredentials("您的 access key", "您的 secret key");
request.addHeaderParameter("Content-Type", "application/x-www-form-urlencoded");
ApiExplorerClient client = new ApiExplorerClient(new AppSigner());
try {
ApiExplorerResponse response = client.sendRequest(request);
// 返回结果格式为Json字符串
System.out.println(response.getResult());
} catch (Exception e) {
e.printStackTrace();
}
}
}
点击复制代码
正常返回示例 {
"jobid": "ZT20210106171337533282530",//系统流水号
"responsetime": "20210106171338305",//响应时间
"errcode": "C0000",//返回码
"errmsg": "查询成功",//返回码描述信息
"result": {
"resultcode": "5"//在网时长编码。1:表示在网时长是0~3个月;2: 表示在网时长是3~6个月;3: 表示在网时长是6~12个月;4: 表示在网时长是12~24月;5: 表示在网时长是24个月以上;6: 系统无记录;7:号码状态异常(1、销号 6 月以上的情况 2、携号转网 3、未放号的号码等);-1:系统异常
},
"encresult": ""//保留字段,暂未使用
}
//响应码释义:
C0000:交易成功
C0025:查询成功无结果
C0026:查询成功无结果
C0096:查询失败
00029:请求参数不标准
C0061:查询次数超限
21005:该产品暂时无法使用
210J2:请求手机号格式错误
910RE:系统交易超时
91096:系统其他错误
失败返回示例 {
"jobid": "ZT20201230164545238130741",
"responsetime": "20201230164545557",
"errcode": "00029",
"errmsg": "请求参数不标准",
"result": {},
"encresult": ""
}
错误码定义
