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

# Get QR Image

> Return the QR code directly as an image/png response. This is useful for browser previews, documentation pages, and img tags. You can authenticate using the Authorization bearer header or the apiKey query parameter.

Return the WhatsApp QR code directly as an image.

This endpoint is useful when you want to display the QR code in a browser, documentation page, or an `<img>` tag. For browser image rendering, pass the API key as a query parameter because image tags cannot send Authorization headers.

```html theme={null}
<img src="https://app.wachat.net/api/v1/instance/qr/image?instanceName=t1_mq9r2jov_store-jakarta&apiKey=YOUR_API_KEY" alt="WhatsApp QR Code" />
```

<Warning>
  Passing an API key in a URL can expose it in browser history, logs, or analytics. Use this only when you need direct image rendering. For backend integrations, prefer the `Authorization: Bearer YOUR_API_KEY` header.
</Warning>


## OpenAPI

````yaml GET /instance/qr/image
openapi: 3.0.3
info:
  title: Wachat Enterprise API
  description: >
    Welcome to the official Wachat API reference. Wachat provides
    developer-friendly, ultra-reliable infrastructure to scale your WhatsApp
    communications programmatically.


    Easily deploy automated messaging pipelines, orchestrate interactive
    customer engagement patterns, verify phone numbers instantly, and control
    containerized WhatsApp instances via a secure, production-grade REST
    architecture.
  version: 1.0.0
servers:
  - url: https://app.wachat.net/api/v1
    description: Live Production Gateway
security:
  - bearerAuth: []
paths:
  /instance/qr/image:
    get:
      tags:
        - Session Lifecycle Infrastructure
      summary: Get Instance QR Image
      description: >-
        Return the QR code directly as an image/png response. This is useful for
        browser previews, documentation pages, and img tags. You can
        authenticate using the Authorization bearer header or the apiKey query
        parameter.
      parameters:
        - in: query
          name: instanceName
          required: true
          schema:
            type: string
          description: Final unique instance name returned by Wachat.
          example: t1_mq9r2jov_jakarta_store
        - in: query
          name: apiKey
          required: false
          schema:
            type: string
          description: >-
            Optional API key for direct browser image rendering. Prefer
            Authorization bearer header for server-to-server requests.
          example: YOUR_API_KEY
      responses:
        '200':
          description: QR code image returned successfully.
          content:
            image/png:
              schema:
                type: string
                format: binary
        '400':
          description: Missing instanceName query parameter.
        '401':
          description: Missing or invalid API key.
        '403':
          description: Subscription restriction prevented QR generation.
        '404':
          description: Instance not found for this API key.
        '409':
          description: QR code is only available for WhatsApp Baileys instances.
        '502':
          description: Failed to fetch or decode the QR code image.
        '504':
          description: Wachat API request timed out.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authenticate your integration payloads by injecting your premium secure
        Wachat Account API Private Secret Key inside standard Authorization
        Bearer header vectors.

````