本文为您提供了Go语言版本的提交查询接口对接DEMO示例
//测试:go run ./test.go
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
const strUrl = "https://api.ihuyi.com/idcard/ent2f/Submit.json"
func main() {
v := url.Values{}
v.Set("account", "xxxxxxxx") //APIID(用户中心【认证核验】-【企业信息验证】-【产品总览】查看)
v.Set("password", "xxxxxxxxx") //1、APIKEY(用户中心【认证核验】-【企业信息验证】-【产品总览】查看)
2、动态密码(生成动态密码方式请看该文档末尾的说明)
v.Set("ent_name", "上海************有限公司") //企业名称
v.Set("ent_code", "913******") //社会信用代码
v.Set("time", "1623643787") //Unix时间戳(10位整型数字,当使用动态密码方式时为必填)
body := strings.NewReader(v.Encode()) //把form数据编码
client := &http.Client{}
req, _ := http.NewRequest("POST", strUrl, body)
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
resp, err := client.Do(req) //发送
if err != nil {
fmt.Println(err)
}
defer resp.Body.Close() //一定要关闭resp.Body
res, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(res))
}
国内专业互联网团队
21年行业经验
7x24小时售后支持
丰富的行业经验
Copyright © 2004-2025 上海思锐信息技术有限公司 All rights reserved. 沪ICP备07035915号-15 电信增值业务许可证:B2-20160082
服务热线:
4008 808 898
服务热线(工作时间):
4008 808 898
业务咨询(非工作时间):
售后咨询(非工作时间):