后面可能不在公开 H5ST 算法了,但是可以通过调用接口来完成。
你也想一起起舞吗?移步 Docker Hub 搭建此镜像
目前不会收费,以后更不会收费,大家可以放心调用。
目前不会收费,以后更不会收费,大家可以放心调用。
目前不会收费,以后更不会收费,大家可以放心调用。
下面为 Demo 示例服务,不保证可用性。
更新日志
- 20240703 新增小程序xcx4.7.1版本
- 20240710 新增小程序xcx4.2.0版本,新增
debug
参数,用于打印控制台调试信息
- 20240712 新增4.7.4版本
接口导入
curl --location --request POST 'https://jd1.zhx47.xyz/h5st' \
--header 'Content-Type: application/json' \
--data-raw '{
"version": "4.7.2",
"pin": "xxxxxxx",
"ua": "jdapp;android;10.1.0;10;network/wifi;Mozilla/5.0 (Linux; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
"body": {
"functionId": "jx_party_assist",
"appid": "signed_wh5",
"body": {
"inviteCode": "qyllTNCS_z5PNF2X9wWw8x6ou5sG2vydRZ5qQsVuY3pQXhZ2FYkpPdZ9oRg",
"deviceInfo": "{\"sdkToken\":null,\"jsToken\":\"jdd03FCNRDDVMXEKLIIJD4Q5W65QGV7PJWTETJQ7H4HUJ6HKEDA24HVAK64XB3SG2GEAUKNBN3AE6CWLMWTWMRGBKY7ET2QAAAAMP2NNEKBAAAAAACN5OBLPDJGEPVYX\"}",
"areaInfo": "1_72_55674_0",
"unpl": "",
"qdPageId": "MO-J2011-1",
"mdClickId": "Babel_dev_other_11lotterystart"
},
"client": "wh5",
"uuid": "",
"clientVersion": "1.0.0",
"d_model": "0-2-999",
"osVersion": "",
"eid": ""
},
"h5st": "20240623231852094;ziizt999ymn5g6i1;a525b;tk03w96581c1041lMngzMlRoQS00x4M39uRQdKEDoT4tb8MDFnAqS8R-ZqgsNfI3Pvs8J_RvxM52aDOpj0wfdbhOewb7;b8129f83a86c3c0d6a83ec0cb31746851c8e8b56f5a84839e54c45d3b8af40df;4.7;1719155932094;UO2DxDCIfLpKyQHVhaJ3jNjzoum0SY5jB_ggU2k5JhCg55z1qHJTbGjqYhdwhS8aItOrZHzbnjCmMROA2e-IpMvOwG_TVU_FJNDCAakqA3fCrxSN94G_iaIrMjG9Y5JFvX193f_0xoiUgRsn0EYWCBVld5TRDj4umpoTY5ub0JpPHqKzzC8Ir2oDKNgYv1Zg-zI9Qgef2wUaCWb26FpSuj_ckPKMshRZniENhUKf0qNGtbNK8fXmP2Dw2cRENnIWgJyqnzfd5QFTASXwuaunwRdIE-q4v4EwbJMCg8APDlOrAKdfYTu1rUwrOcxV05UT8A8Y4ZK_D5q3gwqZ9AI37PJh_SNR7eZRF1mRws4HZtWCi0nS_LqXu-2AvIN1hdRxvP669glVZC1dIb804ngC-tdkekCP-vnEqek_09exN4MaH1hazEZclljm8N9CRC_uZPUwIq9i6SdMtJRHmUmaTZr8"
}'
Curl
接口文档
POST 生成 H5ST
POST https://jd1.zhx47.xyz/h5st
Body 请求参数
{
"version": "4.7.2",
"pin": "xxxxxxx",
"ua": "jdapp;android;10.1.0;10;network/wifi;Mozilla/5.0 (Linux; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36",
"body": {
"functionId": "jx_party_assist",
"appid": "signed_wh5",
"body": {
"inviteCode": "qyllTNCS_z5PNF2X9wWw8x6ou5sG2vydRZ5qQsVuY3pQXhZ2FYkpPdZ9oRg",
"deviceInfo": "{\"sdkToken\":null,\"jsToken\":\"jdd03FCNRDDVMXEKLIIJD4Q5W65QGV7PJWTETJQ7H4HUJ6HKEDA24HVAK64XB3SG2GEAUKNBN3AE6CWLMWTWMRGBKY7ET2QAAAAMP2NNEKBAAAAAACN5OBLPDJGEPVYX\"}",
"areaInfo": "1_72_55674_0",
"unpl": "",
"qdPageId": "MO-J2011-1",
"mdClickId": "Babel_dev_other_11lotterystart"
},
"client": "wh5",
"uuid": "",
"clientVersion": "1.0.0",
"d_model": "0-2-999",
"osVersion": "",
"eid": ""
},
"h5st": "20240623231852094;ziizt999ymn5g6i1;a525b;tk03w96581c1041lMngzMlRoQS00x4M39uRQdKEDoT4tb8MDFnAqS8R-ZqgsNfI3Pvs8J_RvxM52aDOpj0wfdbhOewb7;b8129f83a86c3c0d6a83ec0cb31746851c8e8b56f5a84839e54c45d3b8af40df;4.7;1719155932094;UO2DxDCIfLpKyQHVhaJ3jNjzoum0SY5jB_ggU2k5JhCg55z1qHJTbGjqYhdwhS8aItOrZHzbnjCmMROA2e-IpMvOwG_TVU_FJNDCAakqA3fCrxSN94G_iaIrMjG9Y5JFvX193f_0xoiUgRsn0EYWCBVld5TRDj4umpoTY5ub0JpPHqKzzC8Ir2oDKNgYv1Zg-zI9Qgef2wUaCWb26FpSuj_ckPKMshRZniENhUKf0qNGtbNK8fXmP2Dw2cRENnIWgJyqnzfd5QFTASXwuaunwRdIE-q4v4EwbJMCg8APDlOrAKdfYTu1rUwrOcxV05UT8A8Y4ZK_D5q3gwqZ9AI37PJh_SNR7eZRF1mRws4HZtWCi0nS_LqXu-2AvIN1hdRxvP669glVZC1dIb804ngC-tdkekCP-vnEqek_09exN4MaH1hazEZclljm8N9CRC_uZPUwIq9i6SdMtJRHmUmaTZr8"
}
JSON
请求参数
名称 |
位置 |
类型 |
必选 |
中文名 |
说明 |
body |
body |
object |
否 |
|
none |
» version |
body |
string |
是 |
算法版本 |
4.2.0 4.3.1 4.3.3 4.4.0 4.7.1 4.7.2 4.7.3 4.7.4 xcx4.2.0 xcx4.7.1 |
» pin |
body |
string |
否 |
账号pin |
用来填充env中的pp,仅在version为xcx小程序版本时不必填 |
» ua |
body |
string |
否 |
请求京东接口所用的UA |
用来填充env中的sua,仅在version为xcx小程序版本时不必填 |
» body |
body |
object |
是 |
发送给京东的参数 |
可以仅提取h5st加签涉及到的参数,可以将全部参数传递过来,这里只描述最低需要的参数 |
»» functionId |
body |
string |
是 |
接口标识 |
必填 |
»» appid |
body |
string |
是 |
唯一标识 |
必填 |
»» body |
body |
object |
是 |
业务参数 |
必填,可以传递JSON字符串或者直接传递Object |
» h5st |
body |
string |
是 |
对应活动的h5st |
解析appid和env,接口替换其中的部分变量进行重新生成 |
» debug |
body |
boolean |
否 |
用于打印控制台调试信息,默认不打印,true打印 |
|
返回示例
成功
{
"code": 200,
"body": {
"h5st": {
"appid": "signed_wh5",
"body": "eb72e2aa61d0ad7dc96efde9fb6481ae8c84a33b5a97735eeab7bc60f0e30514",
"functionId": "jx_party_assist",
"client": "wh5",
"clientVersion": "1.0.0",
"_stk": "appid,body,client,clientVersion,functionId",
"_ste": 1,
"h5st": "20240623231852094;ziizt999ymn5g6i1;a525b;tk03w96581c1041lMngzMlRoQS00x4M39uRQdKEDoT4tb8MDFnAqS8R-ZqgsNfI3Pvs8J_RvxM52aDOpj0wfdbhOewb7;b8129f83a86c3c0d6a83ec0cb31746851c8e8b56f5a84839e54c45d3b8af40df;4.7;1719155932094;UO2DxDCIfLpKyQHVhaJ3jNjzoum0SY5jB_ggU2k5JhCg55z1qHJTbGjqYhdwhS8aItOrZHzbnjCmMROA2e-IpMvOwG_TVU_FJNDCAakqA3fCrxSN94G_iaIrMjG9Y5JFvX193f_0xoiUgRsn0EYWCBVld5TRDj4umpoTY5ub0JpPHqKzzC8Ir2oDKNgYv1Zg-zI9Qgef2wUaCWb26FpSuj_ckPKMshRZniENhUKf0qNGtbNK8fXmP2Dw2cRENnIWgJyqnzfd5QFTASXwuaunwRdIE-q4v4EwbJMCg8APDlOrAKdfYTu1rUwrOcxV05UT8A8Y4ZK_D5q3gwqZ9AI37PJh_SNR7eZRF1mRws4HZtWCi0nS_LqXu-2AvIN1hdRxvP669glVZC1dIb804ngC-tdkekCP-vnEqek_09exN4MaH1hazEZclljm8N9CRC_uZPUwIq9i6SdMtJRHmUmaTZr8"
},
"body": {
"functionId": "jx_party_assist",
"appid": "signed_wh5",
"body": "{\"inviteCode\":\"qyllTNCS_z5PNF2X9wWw8x6ou5sG2vydRZ5qQsVuY3pQXhZ2FYkpPdZ9oRg\",\"deviceInfo\":\"{\\\"sdkToken\\\":null,\\\"jsToken\\\":\\\"jdd03FCNRDDVMXEKLIIJD4Q5W65QGV7PJWTETJQ7H4HUJ6HKEDA24HVAK64XB3SG2GEAUKNBN3AE6CWLMWTWMRGBKY7ET2QAAAAMP2NNEKBAAAAAACN5OBLPDJGEPVYX\\\"}\",\"areaInfo\":\"1_72_55674_0\",\"unpl\":\"\",\"qdPageId\":\"MO-J2011-1\",\"mdClickId\":\"Babel_dev_other_11lotterystart\"}",
"client": "wh5",
"uuid": "",
"clientVersion": "1.0.0",
"d_model": "0-2-999",
"osVersion": "",
"eid": "",
"h5st": "20240623231852094;ziizt999ymn5g6i1;a525b;tk03w96581c1041lMngzMlRoQS00x4M39uRQdKEDoT4tb8MDFnAqS8R-ZqgsNfI3Pvs8J_RvxM52aDOpj0wfdbhOewb7;b8129f83a86c3c0d6a83ec0cb31746851c8e8b56f5a84839e54c45d3b8af40df;4.7;1719155932094;UO2DxDCIfLpKyQHVhaJ3jNjzoum0SY5jB_ggU2k5JhCg55z1qHJTbGjqYhdwhS8aItOrZHzbnjCmMROA2e-IpMvOwG_TVU_FJNDCAakqA3fCrxSN94G_iaIrMjG9Y5JFvX193f_0xoiUgRsn0EYWCBVld5TRDj4umpoTY5ub0JpPHqKzzC8Ir2oDKNgYv1Zg-zI9Qgef2wUaCWb26FpSuj_ckPKMshRZniENhUKf0qNGtbNK8fXmP2Dw2cRENnIWgJyqnzfd5QFTASXwuaunwRdIE-q4v4EwbJMCg8APDlOrAKdfYTu1rUwrOcxV05UT8A8Y4ZK_D5q3gwqZ9AI37PJh_SNR7eZRF1mRws4HZtWCi0nS_LqXu-2AvIN1hdRxvP669glVZC1dIb804ngC-tdkekCP-vnEqek_09exN4MaH1hazEZclljm8N9CRC_uZPUwIq9i6SdMtJRHmUmaTZr8"
},
"qs": "functionId=jx_party_assist&appid=signed_wh5&body=%7B%22inviteCode%22%3A%22qyllTNCS_z5PNF2X9wWw8x6ou5sG2vydRZ5qQsVuY3pQXhZ2FYkpPdZ9oRg%22%2C%22deviceInfo%22%3A%22%7B%5C%22sdkToken%5C%22%3Anull%2C%5C%22jsToken%5C%22%3A%5C%22jdd03FCNRDDVMXEKLIIJD4Q5W65QGV7PJWTETJQ7H4HUJ6HKEDA24HVAK64XB3SG2GEAUKNBN3AE6CWLMWTWMRGBKY7ET2QAAAAMP2NNEKBAAAAAACN5OBLPDJGEPVYX%5C%22%7D%22%2C%22areaInfo%22%3A%221_72_55674_0%22%2C%22unpl%22%3A%22%22%2C%22qdPageId%22%3A%22MO-J2011-1%22%2C%22mdClickId%22%3A%22Babel_dev_other_11lotterystart%22%7D&client=wh5&uuid=&clientVersion=1.0.0&d_model=0-2-999&osVersion=&eid=&h5st=20240623231852094%3Bziizt999ymn5g6i1%3Ba525b%3Btk03w96581c1041lMngzMlRoQS00x4M39uRQdKEDoT4tb8MDFnAqS8R-ZqgsNfI3Pvs8J_RvxM52aDOpj0wfdbhOewb7%3Bb8129f83a86c3c0d6a83ec0cb31746851c8e8b56f5a84839e54c45d3b8af40df%3B4.7%3B1719155932094%3BUO2DxDCIfLpKyQHVhaJ3jNjzoum0SY5jB_ggU2k5JhCg55z1qHJTbGjqYhdwhS8aItOrZHzbnjCmMROA2e-IpMvOwG_TVU_FJNDCAakqA3fCrxSN94G_iaIrMjG9Y5JFvX193f_0xoiUgRsn0EYWCBVld5TRDj4umpoTY5ub0JpPHqKzzC8Ir2oDKNgYv1Zg-zI9Qgef2wUaCWb26FpSuj_ckPKMshRZniENhUKf0qNGtbNK8fXmP2Dw2cRENnIWgJyqnzfd5QFTASXwuaunwRdIE-q4v4EwbJMCg8APDlOrAKdfYTu1rUwrOcxV05UT8A8Y4ZK_D5q3gwqZ9AI37PJh_SNR7eZRF1mRws4HZtWCi0nS_LqXu-2AvIN1hdRxvP669glVZC1dIb804ngC-tdkekCP-vnEqek_09exN4MaH1hazEZclljm8N9CRC_uZPUwIq9i6SdMtJRHmUmaTZr8"
},
"message": "成功"
}
JSON
返回结果
返回数据结构
状态码 201
名称 |
类型 |
必选 |
约束 |
中文名 |
说明 |
» code |
integer |
true |
none |
返回码 |
200为正常 |
» body |
object |
true |
none |
加签结果 |
none |
»» h5st |
object |
true |
none |
h5st加签结果 |
none |
»»» _stk |
string |
true |
none |
参与加签的字段 |
none |
»»» _ste |
integer |
true |
none |
加签结果 |
1为正常加签 |
»»» h5st |
string |
true |
none |
加签结果 |
none |
»» body |
object |
true |
none |
发送给京东的参数 |
这里是接口传递过来的body + 新的h5st,方便用户使用 |
»»» functionId |
string |
true |
none |
接口标识 |
none |
»»» appid |
string |
true |
none |
唯一标识 |
none |
»»» body |
string |
true |
none |
业务参数 |
这里无论接口传递过来的body字段如果是Object,自动处理成JSON字符串 |
»»» h5st |
string |
true |
none |
加签结果 |
none |
»» qs |
string |
true |
none |
发送给京东的参数 |
body的qs格式,方便用户使用 |
» message |
string |
true |
none |
返回描述 |
none |
示例代码
// eslint-disable-next-line @typescript-eslint/no-var-requires
const axios = require('axios');
const ua =
'jdapp;iPhone;13.0.2;;;M/5.0;appBuild/169363;jdSupportDarkMode/0;ef/1;ep/%7B%22ciphertype%22%3A5%2C%22cipher%22%3A%7B%22ud%22%3A%22ENU4YtOmCQHtCtLsDNvtYWPsCJrrYJCzCQUyZtC1DWDvYJPvEJDtDq%3D%3D%22%2C%22sv%22%3A%22CJckDM4n%22%2C%22iad%22%3A%22DzcyCJO0D0SjC0U4Ds00DNc2BUOmHtYjGuY4GzSmHNPMEJSz%22%7D%2C%22ts%22%3A1717142254%2C%22hdid%22%3A%22JM9F1ywUPwflvMIpYPok0tt5k9kW4ArJEU3lfLhxBqw%3D%22%2C%22version%22%3A%221.0.3%22%2C%22appname%22%3A%22com.360buy.jdmobile%22%2C%22ridx%22%3A-1%7D;Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1;',
cookie = 'pt_key=xxxxxxxxxx; pt_pin=xxxxxxxxxx;',
pt_pin = cookie.match(/pt_pin=([^;]+)/)[1];
const options = {
method: 'POST',
url: 'https://jd1.zhx47.xyz/h5st',
headers: { 'content-type': 'application/json' },
data: {
version: '4.7.3',
pin: pt_pin,
ua: ua,
body: { functionId: 'windControl_queryScore_v1', appid: 'plus_business', body: '{}' },
h5st: '20240616121908047;9ii9nzm6tgn95n55;b63ff;tk03wc5b01c0941lMSsxeDJSbXpow_lx6AxX61W7VUCdxFf2sAtz1CMvo6wt8aHTVCsXx8OMzUAmBno3MiB-iM7MIE75;7e25aed469594bc4d140f680dbf583ff4167e4ecd21e56ddaa9a8b38a80cb9fc;4.7;1718511548047;VSkNRaljM7DmfmPrj4fPE5uIGsOmBHumjgv4lhxc6s_BXFNsAR1K15wpoIo-_iZBb6Xlo1k_ejBbAEMjISvAdI8rSGXy0F2Alouf73uGEciHlAVX4gRcsOLtu_wwP0XSUpiqZqjulOIoJmI30R_BNkIGdUVUHwVMq2b804xLpHBHCihpcHd8dsy53kh3jtnMYUkyuoLtGUqRDyGw8yHgo-u2trZZvAjWNmofAxzIPqeKtEOkzntU6xHEthaBva5iXsK0QUgkq_ZwK0pEvvKebgQ7oW6hSVBLI1-l_aVz1C_jFI1nMQ-6cmlQQw2pvKCxcKrEHW0wwn4Mts_02XAxn9L0nnEevJnlFyguA92Tp0yQKr57FVU9xfYtZwN3pEHkhch6R479deMl8nvz5g9djNbXRsHabaG8rl7KlrhCth7O',
},
};
(async () => {
try {
const { data } = await axios.request(options);
console.log(data.body.qs);
const { data: temp } = await axios.request({
method: 'POST',
url: `https://api.m.jd.com/api?functionId=windControl_queryScore_v1`,
headers: {
'content-type': 'application/x-www-form-urlencoded',
origin: 'https://plus.m.jd.com',
Referer: 'https://plus.m.jd.com/rights/windControl',
'User-Agent': ua,
cookie,
'x-referer-page': 'https://plus.m.jd.com/rights/windControl',
},
data: data.body.qs,
});
console.log(temp);
} catch (error) {
console.error(error);
}
})();
JavaScript
日志打印