短信签名快速报备,马上注册寻求客户经理支持!
所有文档
运营商信息核验
文档中心 > 运营商信息核验 > 空号检测

空号检测

Python对接空号检测提交接口接口DEMO示例
本文为您提供了Python语言版本的空号检测提交接口接口对接DEMO示例

#python3.10.2

import http.client
import urllib.parse
import json

hostname = "api.ihuyi.com"
request_uri = "/empty-number/submit"

#定义请求的数据
values = {
    'mobiles':["135xxxxxxxx","136xxxxxxxx"], #手机号数组(最多10个)
}

#将数据进行编码
params = json.dumps(values).encode(encoding='UTF8')

#定义请求的头部
headers = {
    "Content-type": "application/json",
    "Date": "Tue, 26 Aug 2025 07:14:23 GMT",
    "Authorization": "Signature xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Accept": "text/plain"
}

#初始化一个 http 链接
conn = http.client.HTTPConnection(hostname)
conn.request("POST", request_uri, params, headers)
response = conn.getresponse()

#打印状态
print(response.status, response.reason)

#打印结果
print(response.read().decode("utf-8"))
conn.close()

在线咨询
服务热线:
4008 808 898

免费体验

提交成功
若短信发送异常,系统将自动给您发送语音验证码,请注意接听电话。

填写验证码后,点击“开通体验账户”自动开通体验账户。

收不到短信验证码?
×