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

# Login perangkat dengan kode QR

> Mulai pemasangan QR untuk slot perangkat tertentu dan kembalikan tautan gambar QR untuk dipindai. Setara dengan `GET /app/login` menggunakan `X-Device-Id: <device_id>`, dengan perangkat diambil dari path.



## OpenAPI

````yaml /id/openapi.yml get /devices/{device_id}/login
openapi: 3.0.0
info:
  title: WhatsApp API MultiDevice
  version: 9.7.0
  description: >
    API ini digunakan untuk mengirim pesan WhatsApp melalui API.


    Dashboard web merupakan proyek terpisah (gowa-ui); server mengunduh aset
    rilis

    terbarunya dan menyajikannya di `/` (atau mengembalikan banner JSON saat

    APP_UI_ENABLED=false).


    Cakupan perangkat:

    - Kirim `X-Device-Id` pada semua panggilan REST yang memiliki cakupan
    perangkat.

    - WebSocket: hubungkan ke `/ws?device_id=<id>`.

    - Autentikasi WebSocket (saat autentikasi dasar diaktifkan): browser tidak
    dapat menyetel
      header Authorization pada koneksi WebSocket, sehingga sertakan juga
      `&authorization=<base64(user:pass)>` dalam query string. Gunakan TLS di
      produksi karena kredensial terlihat di URL.
servers:
  - url: http://localhost:3000
security:
  - basicAuth: []
tags:
  - name: app
    description: Koneksi awal ke server WhatsApp
  - name: device
    description: Pengelolaan perangkat untuk dukungan multi-perangkat
  - name: user
    description: Mengambil informasi
  - name: send
    description: Kirim pesan (teks/gambar/berkas/video).
  - name: message
    description: Manipulasi pesan (cabut/beri reaksi/perbarui).
  - name: call
    description: Pengelolaan panggilan (tolak panggilan masuk)
  - name: chat
    description: Percakapan chat dan perpesanan
  - name: group
    description: Pengaturan grup
  - name: newsletter
    description: Pengaturan newsletter
  - name: chatwoot
    description: Integrasi Chatwoot untuk dukungan pelanggan
paths:
  /devices/{device_id}/login:
    get:
      tags:
        - device
      summary: Login perangkat dengan kode QR
      description: >-
        Mulai pemasangan QR untuk slot perangkat tertentu dan kembalikan tautan
        gambar QR untuk dipindai. Setara dengan `GET /app/login` menggunakan
        `X-Device-Id: <device_id>`, dengan perangkat diambil dari path.
      operationId: loginDevice
      parameters:
        - name: device_id
          in: path
          required: true
          schema:
            type: string
          description: ID perangkat
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceLoginResponse'
        '404':
          description: Perangkat tidak ditemukan
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorNotFound'
        '500':
          description: Kesalahan Internal Server
          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: Kode Status HTTP
        message:
          type: string
          example: Chat not found
          description: Pesan kesalahan terperinci
        results:
          type: object
          example: null
          description: data tambahan
    ErrorInternalServer:
      type: object
      properties:
        code:
          type: string
          example: INTERNAL_SERVER_ERROR
          description: SYSTEM_CODE_ERROR
        message:
          type: string
          example: you are not loggin
          description: Pesan kesalahan terperinci
        results:
          type: object
          example: null
          description: data tambahan
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

## Related topics

- [Login perangkat dengan kode pemasangan](https://gowa-docs.mintlify.site/id/api-reference/device/login-perangkat-dengan-kode-pemasangan.md)
- [Login dengan kode pemasangan](https://gowa-docs.mintlify.site/id/api-reference/app/login-dengan-kode-pemasangan.md)
- [Mulai Cepat](https://gowa-docs.mintlify.site/id/quickstart.md)
- [Penanganan Kesalahan](https://gowa-docs.mintlify.site/id/advanced/error-handling.md)
- [Error](https://gowa-docs.mintlify.site/id/api-reference/errors.md)


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