> ## 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 イメージへのリンクを返します。 `X-Device-Id: <device_id>` を使用して `GET /app/login` と同等で、代わりにパスからデバイスを取得します。



## OpenAPI

````yaml /ja/openapi.yml get /devices/{device_id}/login
openapi: 3.0.0
info:
  title: WhatsApp API マルチデバイス
  version: 9.7.0
  description: |
    この API は API 経由で whatsapp を送信するために使用されます。

    Web ダッシュボードは別のプロジェクトです (gowa-ui); サーバーは
    最新のリリースアセットをダウンロードし、`/`で動作します（または、
    APP_UI_ENABLED=falseの場合はJSONバナーを返します）。

    デバイススコープ:
    - すべてのデバイススコープの REST コールで `X-Device-Id` を送信します。
    - WebSocket: `/wsに接続しますか？device_id=<id> ` 。
    - WebSocket 認証（Basic Auth が有効な場合）: ブラウザーは WebSocket 接続で
      Authorization ヘッダーを設定できないため、クエリ文字列にも
      `&authorization=<base64(user:pass)>` を渡してください。 認証情報が URL に表示されるため、本番環境では
      TLS を使用してください。
servers:
  - url: http://localhost:3000
security:
  - basicAuth: []
tags:
  - name: app
    description: Whatsappサーバーへの初期接続
  - name: device
    description: マルチデバイスサポートのためのデバイス管理
  - name: user
    description: 情報の取得
  - name: send
    description: メッセージ (テキスト/イメージ/ファイル/ビデオ) を送信します。
  - name: message
    description: メッセージ操作 (revoke/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 イメージへのリンクを返します。 `X-Device-Id:
        <device_id>` を使用して `GET /app/login` と同等で、代わりにパスからデバイスを取得します。
      operationId: loginDevice
      parameters:
        - name: device_id
          in: path
          required: true
          schema:
            type: string
          description: デバイス ID
      responses:
        '200':
          description: OK
          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: システムのコードにエラー
        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/ja/api-reference/device/ペアリングコードでデバイスにログイン.md)
- [ペアリングコードでログイン](https://gowa-docs.mintlify.site/ja/api-reference/app/ペアリングコードでログイン.md)
- [Whatsappサーバーにログイン](https://gowa-docs.mintlify.site/ja/api-reference/app/whatsappサーバーにログイン.md)
- [デバイスを削除](https://gowa-docs.mintlify.site/ja/api-reference/device/デバイスを削除.md)
- [接続状況を取得する](https://gowa-docs.mintlify.site/ja/api-reference/app/接続状況を取得する.md)


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