បង្កើតលេខកូដ 2FA (TOTP)
POST /api/v1/tools/2fa-codeបិទភ្ជាប់សោសម្ងាត់ 2FA (មួយ ឬច្រើនបន្ទាត់ ទទួលទាំង គណនី|ពាក្យសម្ងាត់|SECRET និង otpauth://) ដើម្បីទទួលលេខកូដ 6 ខ្ទង់ដែលធ្វើឱ្យថ្មីរៀងរាល់ 30 វិនាទី។ គណនាក្នុងកម្មវិធីរុករករបស់អ្នក — សោសម្ងាត់មិនចាកចេញពីឧបករណ៍របស់អ្នកទេ។ ឥតគិតថ្លៃ, មាន API។
rate limit ឥតគិតថ្លៃ: 60 request/នាទី, 1,000 request/ថ្ងៃ, 100 ធាតុ/request
| ប៉ារ៉ាម៉ែត្រ | ប្រភេទ | ការពិពណ៌នា |
|---|---|---|
secrets * | string | string[] | សោសម្ងាត់ 2FA — មួយបន្ទាត់មួយ (អតិបរមា 100)៖ base32, គណនី|ពាក្យសម្ងាត់|SECRET ឬ otpauth://totp/… |
time | string | ពេលវេលា Unix (ស្រេចចិត្ត) — គិតជាវិនាទី; ទុកទទេ = ម៉ោងម៉ាស៊ីនមេ |
curl -X POST 'https://sieutool.net/api/v1/tools/2fa-code' \
-H 'Content-Type: application/json' \
-H "X-API-Key: $NXP_API_KEY" \
-d '{"secrets":"JBSWY3DPEHPK3PXP\[email protected]|matkhau|GEZD GNBV GY3T QOJQ","time":1700000000}'{
"ok": true,
"tool": "2fa-code",
"version": "1.0.0",
"data": {
"time": 1700000000,
"items": [
{
"line": 1,
"ok": true,
"label": "JBSW…3PXP",
"issuer": null,
"code": "324550",
"next_code": "367665",
"digits": 6,
"period": 30,
"algorithm": "SHA1",
"remaining_s": 10
},
{
"line": 2,
"ok": true,
"label": "[email protected]",
"issuer": null,
"code": "017492",
"next_code": "907147",
"digits": 6,
"period": 30,
"algorithm": "SHA1",
"remaining_s": 10
}
]
}
}