> ## 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.

# تسجيل الدخول لجهاز باستخدام رمز QR

> بدء اقتران QR لفتحة جهاز معين وإعادة رابط إلى صورة QR للمسح الضوئي. مكافئ ل `GET /app/login` مع `X-Device-Id: <device_id>`، مع الجهاز المأخوذ من المسار بدلا من ذلك.



## OpenAPI

````yaml /ar/openapi.yml get /devices/{device_id}/login
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:
  /devices/{device_id}/login:
    get:
      tags:
        - device
      summary: تسجيل الدخول لجهاز باستخدام رمز QR
      description: >-
        بدء اقتران QR لفتحة جهاز معين وإعادة رابط إلى صورة QR للمسح الضوئي.
        مكافئ ل `GET /app/login` مع `X-Device-Id: <device_id>`، مع الجهاز
        المأخوذ من المسار بدلا من ذلك.
      operationId: loginDevice
      parameters:
        - name: device_id
          in: path
          required: true
          schema:
            type: string
          description: معرف الجهاز
      responses:
        '200':
          description: حسناً
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceLoginResponse'
        '404':
          description: الجهاز غير موجود
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorNotFound'
        '500':
          description: خطأ خادم داخلي
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInternalServer'
components:
  schemas:
    DeviceLoginResponse:
      type: object
      properties:
        code:
          type: string
          example: SUCCESS
        message:
          type: string
          example: Login success
        status:
          type: integer
          example: 200
        results:
          type: object
          properties:
            device_id:
              type: string
              example: my-device-id
            qr_link:
              type: string
              example: >-
                http://localhost:3000/statics/images/qrcode/scan-qr-b0b7bb43-9a22-455a-814f-5a225c743310.png
            qr_duration:
              type: integer
              example: 30
    ErrorNotFound:
      type: object
      properties:
        code:
          type: string
          example: 404
          description: رمز حالة HTTP
        message:
          type: string
          example: Chat not found
          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)
- [تسجيل الدخول إلى خادم Whatsapp](https://gowa-docs.mintlify.site/ar/api-reference/app/تسجيل-الدخول-إلى-خادم-whatsapp.md)
- [تسجيل الدخول إلى جهاز برمز الاقتران](https://gowa-docs.mintlify.site/ar/api-reference/device/تسجيل-الدخول-إلى-جهاز-برمز-الاقتران.md)
- [الجلسات و دورة حياة الاتصال](https://gowa-docs.mintlify.site/ar/concepts/sessions.md)
- [خطأ في التعامل](https://gowa-docs.mintlify.site/ar/advanced/error-handling.md)


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