> ## Documentation Index
> Fetch the complete documentation index at: https://doc.evolution-api.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Instance Connect

> Generates and returns the QR code for WhatsApp connection



## OpenAPI

````yaml openapi-v2 GET /instance/connect/{instance}
openapi: 3.0.3
info:
  title: Evolution API
  version: 2.1.1
servers:
  - url: https://{server-url}
    variables:
      server-url:
        default: evolution-example
        description: The URL of your EvolutionAPI server
    description: Your instance domain
security: []
paths:
  /instance/connect/{instance}:
    get:
      tags:
        - Instance Controller
      summary: Instances Connect
      description: Generates and returns the QR code for WhatsApp connection
      operationId: instanceConnect
      parameters:
        - name: instance
          in: path
          required: true
          description: Name of the instance to connect
          schema:
            type: string
        - name: number
          description: Phone number (with country code) to be connected
          in: query
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  pairingCode:
                    type: string
                    description: The unique code used for pairing a device or account.
                  code:
                    type: string
                    description: >-
                      A specific code associated with the pairing process. This
                      may include tokens or other identifiers.
                  count:
                    type: integer
                    description: >-
                      The count or number of attempts or instances related to
                      the pairing process.
                example:
                  pairingCode: WZYEH1YY
                  code: 2@y8eK+bjtEjUWy9/FOM...
                  count: 1
        '404':
          description: Instance not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: The HTTP status of the response
                  error:
                    type: string
                    description: The error message indicating the type of error
                  response:
                    type: object
                    properties:
                      message:
                        type: array
                        items:
                          type: string
                        description: List of detailed error messages
                example:
                  status: 404
                  error: Not Found
                  response:
                    message:
                      - The "invalid-instance" instance does not exist
      deprecated: false
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: Your authorization key header

````