通過 POST 方式提交,數(shù)據(jù)編碼采用 utf-8 格式。
簽名認證【必讀】 簽名機制文檔:http://www.yutao.net.cn/api/request.html
https://api.ihuyi.com/empty-number/balance
| 參數(shù)名稱 | 參數(shù)值描述 | 示例 | 類型 | 必填 |
| Content-Type | 內容類型,固定值 | application/json | string | 是 |
| Date | GMT時間,誤差±300秒 | Mon, 16 Jun 2025 08:24:34 GMT | string | 是 |
| Authorization | 簽名頭 | Signature keyId="end7348191", algorithm="hmac-sha256", ... | string | 是 |
| 參數(shù)名稱 | 參數(shù)值描述 | 示例 | 類型 | 必填 |
| 參數(shù)名稱 | 參數(shù)值描述 | 示例 | 類型 | 必返 |
| code | 狀態(tài)碼(2成功) | OK|ParamError | string | |
| msg | 結果描述 | 請求成功|參數(shù)錯誤 | string | |
| data | 數(shù)據(jù) | object | ||
| balance | 剩余檢測條數(shù) | 1 | int |
| code | msg |
| 0 | 未知錯誤 |
| 2 | 請求成功 |
| 400 | 非法IP訪問 |
| 403 | 應用不存在 |
| 405 | API ID或API KEY不正確 |
| 4050 | 余額查詢失敗 |
| 40505 | 沒有簽訂合同 |
| 4051 | 剩余條數(shù)不足 |
| 1100 | 參數(shù)錯誤 |
不支持
示例(成功)
{"code":"OK","msg":"請求成功","data":{"balance":1}}
示例(失?。?/p>
{"code":"ParamError","msg":"參數(shù)錯誤"}
$keyId = 'xxxxxxxxxxxxxxxx'; //可登錄用戶中心查看,對應APIID
$Data = gmdate('D, d M Y H:i:s \G\M\T');
$algorithm = 'hmac-sha256';
$signature = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; // 請?zhí)鎿Q為您的簽名字符串,可參考:https://gitee.com/shsurlink/api-demo/blob/master/hmac-auth/php/IhuyiSignatureHelper.php
$Authorization = sprintf('Signature keyId="%s", algorithm="%s", headers="%s", signature="%s"', $keyId, $algorithm, '@request-target date host', $signature)
//注意:所有字符編碼統(tǒng)一為UTF-8
國內專業(yè)互聯(lián)網團隊
21年行業(yè)經驗
7x24小時售后支持
豐富的行業(yè)經驗
Copyright ? 2004-2025 上海思銳信息技術有限公司 All rights reserved. 滬ICP備07035915號-15 電信增值業(yè)務許可證:B2-20160082
服務熱線:
4008 808 898
服務熱線(工作時間):
4008 808 898
業(yè)務咨詢(非工作時間):
售后咨詢(非工作時間):