#接口类型:互亿无线实名认证接口
#账户注册:https://user.ihuyi.com/register.html
#注意事项:
#DEMO仅作参考
#此为python3版本
import requests
import json
import time
import hashlib
#接口地址
url = "https://api.ihuyi.com/idcard/Submit.json"
account = "APPID"
password = "APPKEY"
app = "id2mv2" #固定值
name = "8cc0401ce07de9a86741453d9403c025三" #明文:张三
id_card_no = "3601247d762ac571b3937913915939411178c9172X" #明文:36012419960108172X
_now = str(int(time.time()))
password_raw = account + password + app + name + id_card_no + _now
# print(password_raw)
password_md5 = hashlib.md5(password_raw.encode(encoding="UTF-8")).hexdigest()
# print(password)
#定义请求的数据
data = {
"account":account,
# "password":password,
"password":password_md5,
"app":app,
"name":name,
"id_card_no":id_card_no,
"time":_now,
}
#定义请求的头部
headers = {
"Content-type": "application/x-www-form-urlencoded",
"Accept": "text/plain"
}
#发起请求
response = requests.post(url, headers=headers, data=data)
#打印结果
print(response.content.decode())
验证码已发送到您的手机,请查收!
输入验证码后,点击“开通体验账户”按钮可立即开通体验账户。