企業(yè)二要素驗(yàn)證接口文檔 點(diǎn)擊下載
企業(yè)二要素驗(yàn)證接入指南 點(diǎn)擊訪問
#接口類型:互億無線實(shí)名認(rèn)證接口
#賬戶注冊:https://user.ihuyi.com/register.html
#注意事項(xiàng):
#DEMO僅作參考
#此為python3版本
import requests
import json
import time
import hashlib
#接口地址
url = "https://api.ihuyi.com/idcard/ent2f/Submit.json"
app = "ent2f"
account = "APPID"
password = "APPKEY"
ent_name = "上海**"
ent_code = "9**************"
_now = str(int(time.time()))
password_raw = account + password + app + ent_name + ent_code + _now
# print(password_raw)
password_md5 = hashlib.md5(password_raw.encode(encoding="UTF-8")).hexdigest()
# print(password)
#定義請求的數(shù)據(jù)
data = {
"app": app,
"account":account,
"password":password_md5,
"ent_name":ent_name,
"ent_code":ent_code,
"time":_now,
}
#定義請求的頭部
headers = {
"Content-type": "application/x-www-form-urlencoded",
"Accept": "text/plain"
}
#發(fā)起請求
response = requests.post(url, headers=headers, data=data)
#打印結(jié)果
print(response.content.decode())
驗(yàn)證碼已發(fā)送到您的手機(jī),請查收!
輸入驗(yàn)證碼后,點(diǎn)擊“開通體驗(yàn)賬戶”按鈕可立即開通體驗(yàn)賬戶。