跳转到内容

完整示例

以下为 cURL 完整调用示例,复制后替换 zn_live_xxxxxxxxxxxx 和参数即可运行。

Terminal window
curl -X GET "https://app.zelnum.com/api/v1/balance" \
-H "X-API-Key: zn_live_xxxxxxxxxxxx"
Terminal window
curl -X POST "https://app.zelnum.com/api/v1/detect" \
-H "X-API-Key: zn_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"product": "YOUR_PRODUCT_SLUG",
"country": "CN",
"phones": ["+8613800138000", "+8613900139000"]
}'
Terminal window
curl -X POST "https://app.zelnum.com/api/v1/detect/file" \
-H "X-API-Key: zn_live_xxxxxxxxxxxx" \
-F "product=YOUR_PRODUCT_SLUG" \
-F "country=CN" \
-F "file=@/path/to/numbers.txt"
Terminal window
curl -X GET "https://app.zelnum.com/api/v1/tasks/xKj9aP3qLm7v" \
-H "X-API-Key: zn_live_xxxxxxxxxxxx"
Terminal window
curl -X GET "https://app.zelnum.com/api/v1/tasks/xKj9aP3qLm7v/result" \
-H "X-API-Key: zn_live_xxxxxxxxxxxx"