運(yùn)營(yíng)商二要素接口文檔 點(diǎn)擊下載
運(yùn)營(yíng)商二要素接入指南 點(diǎn)擊訪問(wèn)
#接口類型:互億無(wú)線實(shí)名認(rèn)證接口
#賬戶注冊(cè):https://user.ihuyi.com/register.html
#注意事項(xiàng):
#DEMO僅作參考
#此為python3版本
#測(cè)試環(huán)境:win10 python3.10.2 pip21.3.1 requests-2.27.1
#類庫(kù)安裝:進(jìn)入python安裝目錄執(zhí)行 pip install requests
import requests
import json
import time
import hashlib
#接口地址
url = 'https://api.ihuyi.com/idcard/Submit.json'
account = 'APPID'
password = 'APPKEY'
app = 'oper2' #固定值
name = '張三'
mobile = '13600000000'
_now = str(int(time.time()))
password_raw = account + password + app + name + mobile + _now
# print(password_raw)
password_md5 = hashlib.md5(password_raw.encode(encoding='UTF-8')).hexdigest()
# print(password)
#定義請(qǐng)求的數(shù)據(jù)
data = {
'account':account,
# 'password':password,
'password':password_md5,
'app':app,
'name':name,
'mobile':mobile,
'time':_now,
}
#定義請(qǐng)求的頭部
headers = {
"Content-type": "application/x-www-form-urlencoded",
"Accept": "text/plain"
}
#發(fā)起請(qǐng)求
response = requests.post(url, headers=headers, data=data)
#打印結(jié)果
print(response.content.decode())
驗(yàn)證碼已發(fā)送到您的手機(jī),請(qǐng)查收!
輸入驗(yàn)證碼后,點(diǎn)擊“開通體驗(yàn)賬戶”按鈕可立即開通體驗(yàn)賬戶。