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

# Connect User to NOX

> Connects a user to NOX with the intent of linking them to a manufacturer asset. Provides a link_url where the user should be redirected to complete the manufacturer authentication flow.



## OpenAPI

````yaml /api-docs/supplier-integration/openapi-supplier-auth.json post /users/{userId}/link
openapi: 3.0.3
info:
  title: NOX Authenticator API
  description: >-
    API for device authentication and linking in the NOX ecosystem.
    **Deprecated:** use the v2 Authenticator API at `https://auth.nox.energy/v2`
    and the **Supplier Integration** section in this documentation.
  version: 1.0.0
  contact:
    name: NOX Integration Team
    email: integration@nox.com
servers:
  - url: https://auth.nox.energy
    description: Server
security: []
tags:
  - name: Supplier Integration
    description: Device authentication and linking
  - name: Sessions
    description: Link session management
  - name: Manufacturer Integration
    description: Manufacturer connection management
paths:
  /users/{userId}/link:
    post:
      tags:
        - Supplier Integration
      summary: Connect User to NOX
      description: >-
        Connects a user to NOX with the intent of linking them to a manufacturer
        asset. Provides a link_url where the user should be redirected to
        complete the manufacturer authentication flow.
      operationId: createLinkSession
      parameters:
        - name: userId
          in: path
          required: true
          description: The supplier's unique identifier for the user
          schema:
            type: string
            example: user_123
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkSessionRequest'
            example:
              redirect_uri: https://your-app.com/callback
              language: en
      responses:
        '201':
          description: Link session created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkSessionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      deprecated: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    LinkSessionRequest:
      type: object
      required:
        - redirect_uri
      properties:
        redirect_uri:
          type: string
          format: uri
          description: >-
            URL where the user will be redirected after authentication. Must be
            registered with your supplier account.
          example: https://your-app.com/callback
        language:
          type: string
          description: Language code for the UI
          default: en
          example: en
        brand:
          type: string
          description: >-
            Optional brand to pre-select for authentication. If provided, users
            will be taken directly to this brand's authentication instead of the
            brand selection screen. Only supported brands are accepted.
          example: daikin
          enum:
            - daikin
            - dewarmte
            - viessmann
            - nibe
            - samsung
            - alpha-innotec
            - lg
            - mitsubishi
            - vaillant
            - bulex
            - saunier-duval
            - thermia
            - toshiba
    LinkSessionResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        timestamp:
          type: integer
          description: Unix timestamp
          example: 1703123456
        data:
          type: object
          properties:
            link_token:
              type: string
              description: Unique token for the link session
              example: abc123def456ghi789jkl012mno345pqr678stu901vwx234yz
            link_url:
              type: string
              format: uri
              description: URL to initiate the authentication flow
              example: >-
                https://link.nox.com/connect?token=abc123def456ghi789jkl012mno345pqr678stu901vwx234yz
            expires_at:
              type: integer
              description: Unix timestamp
              example: 1703124056
            supplier_id:
              type: string
              description: ID of the supplier
              example: supplier_123
            supplier_user_id:
              type: string
              description: Supplier's user ID
              example: user_456
            brand:
              type: string
              description: Pre-selected brand (if any) for direct authentication
              example: daikin
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        timestamp:
          type: integer
          description: Unix timestamp
          example: 1703123456
        error:
          type: string
          description: Human-readable error message
          example: Missing API key
        error_code:
          type: string
          description: Machine-readable error code
          example: missing_api_key
        message:
          type: string
          description: Error message
          example: Missing API key
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can also use 'Authorization: ApiKey
        YOUR_KEY' header.

````