以原C2受理可信Core证明和不变的原TWP字节
POST
/t1/cache/core/v1/exchange
const url = 'https://api.tansr.com/t1/cache/core/v1/exchange';const options = { method: 'POST', headers: { 'x-tansr-cache-core-proof': 'example', 'x-tansr-app-token': '<x-tansr-app-token>', 'Content-Type': 'application/vnd.tansr.cache-exchange.v1' }, body: 'binary'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tansr.com/t1/cache/core/v1/exchange \ --header 'Content-Type: application/vnd.tansr.cache-exchange.v1' \ --header 'x-tansr-app-token: <x-tansr-app-token>' \ --header 'x-tansr-cache-core-proof: example' \ --data binary证明为CacheCoreEnvelope规范JSON的无填充base64url。HMAC-SHA256独立域tansr.sdk2.cache.core.v1加NUL;签名含除signature外全部字段。当前issuer配置、原app_user与已登记来源均须有效。窗口最多300000ms,未来容忍30000ms。Core与原Gateway见证分域;旧四null及旧二进制合同不扩展。成功响应沿原TWP JSON/SSE;全部Core控制错误protocol为sdk2-cache-core-v1,未知结果不能换ID或回退旧路径。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”x-tansr-cache-core-proof
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/vnd.tansr.cache-exchange.v1
string format: binary
Responses
Section titled “Responses”原TWP结果或SSE流;同原受理重放不重复执行/收费。
本文是否有帮助?
感谢反馈,我们会持续改进这篇文章。