> ## Documentation Index
> Fetch the complete documentation index at: https://gowa-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# تقديم تأكيد WebAuthn لإقران مفتاح المرور

> أرسل تأكيد WebAuthn الذي تم إنتاجه للتحدي المعلق (انظر GET /app/passkey). ويجب تقديم هذا التأكيد بواسطة جهة موثقة تحمل مفتاح مرور حساب WhatsApp، مقابل هوية الطرف المعوّل لـWhatsApp؛ وتطابق صيغة الحمولة بين PublicKeyCredential.toJSON). وفي حالة تقديم التأكيد ضمن نافذة الإيقاف لمدة خمس دقائق، يتم تأكيد الاقتران تلقائياً؛ خلاف ذلك يتم إصدار رمز التأكيد (PASSKEY_CONFIRMATION websocket event) ويجب تأكيده عبر POST /app/passkey/تأكيد.




## OpenAPI

````yaml /ar/openapi.yml post /app/passkey/response
openapi: 3.0.0
info:
  title: واتسآب API متعدد الأجهزة
  version: 9.7.0
  description: >
    يتم استخدام هذا API لإرسال أي تطبيق عبر API.


    لوحة المعلومات هي مشروع منفصل (gowa-ui)؛ يقوم الخادم بتنزيل أحدث أصول
    الإصدار

    ويخدمه في `/` (أو يرجع لافتة JSON عندما

    APP_UI_ENABLED=false).


    تحديد الجهاز:

    - إرسال `X-Device-Id` على جميع مكالمات REST على نطاق الجهاز.

    - WebSocket: الاتصال بـ `/w?جهاز_id=<id>`.

    - مصادقة WebSocket (عندما يتم تمكين المصادقة الأساسية): المتصفحات لا يمكن
    تعيين
      رأس التفويض على اتصالات WebSocket ، كذلك اجتاز
      `&authorization=<base64(user:pass)>` في سلسلة الاستفسار. استخدم TLS في إنتاج
      لأن بيانات الاعتماد مرئية في عنوان URL.
servers:
  - url: http://localhost:3000
security:
  - basicAuth: []
tags:
  - name: app
    description: الاتصال الأولي بخادم Whatsapp
  - name: device
    description: إدارة الجهاز لدعم الأجهزة المتعددة
  - name: user
    description: الحصول على المعلومات
  - name: send
    description: إرسال رسالة (نص/صورة/ملف/فيديو).
  - name: message
    description: التلاعب بالرسالة (إلغائ/react/update).
  - name: call
    description: إدارة المكالمات (رفض المكالمات الواردة)
  - name: chat
    description: محادثات الدردشة والرسائل
  - name: group
    description: إعداد المجموعة
  - name: newsletter
    description: إعداد النشرة الإخبارية
  - name: chatwoot
    description: تكامل Chatwoot لدعم العملاء
paths:
  /app/passkey/response:
    post:
      tags:
        - app
      summary: تقديم تأكيد WebAuthn لإقران مفتاح المرور
      description: >
        أرسل تأكيد WebAuthn الذي تم إنتاجه للتحدي المعلق (انظر GET
        /app/passkey). ويجب تقديم هذا التأكيد بواسطة جهة موثقة تحمل مفتاح مرور
        حساب WhatsApp، مقابل هوية الطرف المعوّل لـWhatsApp؛ وتطابق صيغة الحمولة
        بين PublicKeyCredential.toJSON). وفي حالة تقديم التأكيد ضمن نافذة
        الإيقاف لمدة خمس دقائق، يتم تأكيد الاقتران تلقائياً؛ خلاف ذلك يتم إصدار
        رمز التأكيد (PASSKEY_CONFIRMATION websocket event) ويجب تأكيده عبر POST
        /app/passkey/تأكيد.
      operationId: appPasskeyResponse
      parameters:
        - $ref: '#/components/parameters/DeviceIdHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebAuthnAssertion'
      responses:
        '200':
          description: حسناً
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse'
        '400':
          description: طلب خاطئ
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBadRequest'
        '500':
          description: خطأ خادم داخلي
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInternalServer'
components:
  parameters:
    DeviceIdHeader:
      name: X-Device-Id
      in: header
      required: false
      description: |
        معرف الجهاز لدعم الأجهزة المتعددة. مطلوب عند تسجيل أجهزة متعددة.
        إذا تم تسجيل جهاز واحد فقط، فسيتم استخدامه كجهاز افتراضي.
        يمكن أيضا توفيره كعامل استعلام `device_id`.
      schema:
        type: string
        example: my-device-id
  schemas:
    WebAuthnAssertion:
      type: object
      description: >-
        تأكيد WebAuthn في تنسيق PublicKeyCredential.toJSON() (الحقول الثنائية
        base64url-encoed دون إضافة)
      required:
        - id
        - rawId
        - type
        - response
      properties:
        id:
          type: string
          example: XcnXe2W9me1XZTGii6JI9A
        rawId:
          type: string
          example: XcnXe2W9me1XZTGii6JI9A
        type:
          type: string
          example: public-key
        response:
          type: object
          required:
            - clientDataJSON
            - authenticatorData
            - signature
          properties:
            clientDataJSON:
              type: string
            authenticatorData:
              type: string
            signature:
              type: string
            userHandle:
              type: string
              nullable: true
    GenericResponse:
      type: object
      properties:
        code:
          type: string
          example: SUCCESS
        message:
          type: string
          example: Success
        results:
          type: string
          example: null
    ErrorBadRequest:
      type: object
      properties:
        code:
          type: string
          example: 400
          description: رمز حالة HTTP
        message:
          type: string
          example: field cannot be blank
          description: تفاصيل رسالة الخطأ
        results:
          type: object
          example: null
          description: بيانات إضافية
    ErrorInternalServer:
      type: object
      properties:
        code:
          type: string
          example: INTERNAL_SERVER_ERROR
          description: SYSTEM_CODE_ERROR
        message:
          type: string
          example: you are not loggin
          description: تفاصيل رسالة الخطأ
        results:
          type: object
          example: null
          description: بيانات إضافية
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

## Related topics

- [الحصول على حالة اقتران مفتاح المرور المعلق](https://gowa-docs.mintlify.site/ar/api-reference/app/الحصول-على-حالة-اقتران-مفتاح-المرور-المعلق.md)
- [المصادقة](https://gowa-docs.mintlify.site/ar/authentication.md)
- [أحداث WebSocket](https://gowa-docs.mintlify.site/ar/api-reference/websocket.md)
- [اختيار الأجهزة المتعددة و الأجهزة](https://gowa-docs.mintlify.site/ar/concepts/multidevice.md)
- [تأكيد رمز اقتران المفتاح](https://gowa-docs.mintlify.site/ar/api-reference/app/تأكيد-رمز-اقتران-المفتاح.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.