整合
表單 Gate
來自訪客瀏覽器的權杖,由您的伺服器使用網站 Secret 驗證。
簽發權杖
參數
- sitekeystring必填
表單 Gate 的網站 Key,可在控制台中找到。
- signalsobject必填
gate.js 收集:headless_flags(webdriver、headless_ua)、user_agent 及 client(languages、hardware_concurrency、device_memory、platform、timezone、screen、viewport、webgl_renderer)。client 的值只用於這一次驗證:不會被儲存,亦不會用來識別瀏覽器。
回應欄位
- tokenstring
表單使用的一次性權杖,五分鐘後過期。
- expiresAtstring
權杖過期時間,ISO 8601 格式。
- errorstring
失敗時:403 hostname_mismatch(頁面的 Origin 不在該 Gate 的主機名稱中)、404 unknown_site、429 rate_limit_exceeded 或 quota_exhausted。此時 gate.js 會在沒有權杖的情況下提交表單。
curl -X POST https://ipscanner.io/v1/gate/token \
-H "Origin: https://shop.example.com" \
-H "Content-Type: application/json" \
-d '{
"sitekey": "site_4fQ8nZ2kLm7xR1vT9cBw",
"signals": {
"headless_flags": {
"webdriver": false,
"headless_ua": false
},
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 Safari/605.1.15",
"client": {
"languages": [
"en-US",
"en"
],
"hardware_concurrency": 8,
"device_memory": 8,
"platform": "MacIntel",
"timezone": "America/New_York",
"screen": {
"w": 1512,
"h": 982
},
"viewport": {
"w": 1440,
"h": 800
},
"webgl_renderer": "ANGLE (Apple, ANGLE Metal Renderer: Apple M2, Unspecified Version)"
}
}
}'{
"token": "Z3RfNGZROG5aMmtMbTd4UjF2VDljQnd8MTc2MDAwMDAwMHxrM3Z4.Qm9yZGVyIGNvbGxpZQ",
"expiresAt": "2026-10-09T09:35:00Z"
}驗證權杖
參數
- secretstring必填
表單 Gate 的 Secret。僅用於伺服器端,切勿放入頁面。
- tokenstring必填
表單提交的 ipscanner-token 值。
- remote_ipstring
您的伺服器看到的訪客 IP。可選,用於判斷 ip_match。
- emailstring
表單提交的電郵地址。可選;會附加 email 物件並消耗 1 額度。
回應欄位
- successboolean
權杖有效且未使用時為 true。
- classstring
verified_bot、malicious_automation、ai_agent、tor、vpn、proxy、relay、hosting 或 human。
- actionstring
您的策略對該類別的動作:allow、flag 或 block。
- modestring
monitor 或 enforce。monitor 模式下由您決定如何處理 block。
- confidencenumber
信心分數,範圍 0 至 1。
- networkobject
classification、anonymized、provider 及 vpn_provider。vpn_provider 僅按用量付費提供,Free 方案為 null。
- network.vpn_providerstring | null
vpn 地址所屬的 VPN 服務(NordVPN、Mullvad 等),已知時返回。按用量付費提供,Free 方案為 null。
- signalsstring[]
觸發的特徵,例如 webdriver,或由 client 值推導出的 client:tz_mismatch。正常訪客為空。
- hostnamestring
簽發權杖時所在頁面的主機名稱。
- issued_atstring
權杖簽發時間,ISO 8601 格式。
- ip_matchboolean
傳入 remote_ip 且與簽發權杖時的位址不同時為 false。
- emailobject
傳送了 email 時的電郵檢查結果。
- email.statusstring
valid、invalid、risky 或 unknown。
- email.reasonstring | null
原因:syntax、no_mx、null_mx、disposable、typo、role、dns_error 或 quota。valid 時為 null。
- email.suggestionstring | null
當網域似是某個常用電郵網域的拼寫錯誤時,提供修正後的地址。
- email.actionstring
您的電郵策略對該結果的動作。頂層 action 取其與網絡動作中較嚴格者。
- lockedstring[]
在目前方案下以 null 返回的欄位路徑(以點分隔)。按用量付費不返回此欄位。
- planRequiredstring
包含被鎖定欄位的方案。按用量付費不返回此欄位。
- errorstring
success 為 false 時:400 missing_token、invalid_token、expired_token、already_used 或 hostname_mismatch;401 invalid_secret。
curl -X POST https://ipscanner.io/v1/gate/verify \
-H "Content-Type: application/json" \
-d '{
"secret": "gs_YOUR_GATE_SECRET",
"token": "Z3RfNGZROG5aMmtMbTd4UjF2VDljQnd8MTc2MDAwMDAwMHxrM3Z4.Qm9yZGVyIGNvbGxpZQ",
"remote_ip": "203.0.113.7",
"email": "jane@example.com"
}'{
"success": true,
"class": "human",
"action": "allow",
"mode": "enforce",
"confidence": 0.6,
"network": {
"classification": "residential_clean",
"anonymized": false,
"provider": null,
"vpn_provider": null
},
"signals": [],
"hostname": "shop.example.com",
"issued_at": "2026-10-09T09:30:00Z",
"ip_match": true,
"email": {
"status": "valid",
"reason": null,
"suggestion": null,
"domain": "example.com",
"action": "allow"
}
}