ส่งคำตอบ credential ของ Passkey
ส่งคำตอบ credential WebAuthn ที่ serialize แล้วสำหรับเซสชันการให้สิทธิ์ WhatsApp ที่กำลังทำงาน ส่งสตริง webauthn_response โดยไม่แก้ไข และ poll GET /auth จนเป็น authorized หรือ failed
https://api.unifyport.ai/v1/accounts/{account_id}/auth/passkey-responseส่วนหัว
X-Api-KeyAPI key ของพื้นที่ทำงาน ระบบจะระบุพื้นที่ทำงานจากส่วนหัวนี้
Content-Typeใช้ application/json เมื่อต้องส่งเนื้อหาของคำขอเป็น JSON
พารามิเตอร์ใน path
account_idตัวระบุที่ใช้ใน route ของ authentication
เนื้อหาของคำขอ
webauthn_responseคำตอบ credential WebAuthn ที่ serialize แล้ว ส่งสตริงโดยไม่แก้ไขและห้ามบันทึกลง log สาธารณะ
minLength: 1
เนื้อหาการตอบกลับ
account_idบัญชีของผู้ให้บริการที่การตอบกลับนี้อ้างถึง
statusสถานะ flow การให้สิทธิ์ปัจจุบัน เช่น pending_auth, awaiting_qr_scan, awaiting_code, pending, passkey_required, passkey_pending, passkey_confirmation, passkey_confirmation_sent, authorized หรือ failed
auth_statusสถานะการยืนยันตัวตนมาตรฐานหลัง action ของ Passkey ให้ poll GET /auth จนเป็น authorized หรือ failed
การตอบกลับ
200คำขอสำเร็จ ดูตัวอย่างเนื้อหาตอบกลับด้านบน
400เนื้อหาของคำขอ path หรือพารามิเตอร์ไม่ถูกต้อง
401ส่วนหัว X-Api-Key หายไปหรือไม่ถูกต้อง
409การดำเนินการขัดแย้งกับบัญชีของผู้ให้บริการหรือทรัพยากรที่มีอยู่
500บริการพบข้อผิดพลาดที่ไม่คาดคิด
502อะแดปเตอร์หรือ upstream provider ไม่สามารถทำรายการให้เสร็จได้
คำขอ
curl -X POST https://api.unifyport.ai/v1/accounts/{account_id}/auth/passkey-response \
-H "X-Api-Key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"webauthn_response": "{\"id\":\"<CREDENTIAL_ID>\",\"response\":{\"clientDataJSON\":\"<BASE64URL>\"}}"
}'การตอบกลับ
{
"data": {
"account_id": "acc_example",
"status": "passkey_pending",
"auth_status": "passkey_pending"
}
}