> ## 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 with Supplier OAuth

> Connects a manufacturer user to NOX with the intent of linking them to an energy supplier via OAuth. Creates or updates the subscriber record and returns a link_url where the user should be redirected to complete the supplier OAuth flow.



## OpenAPI

````yaml /api-docs/manufacturer-integration/openapi-manufacturer-auth.json post /manufacturers/suppliers
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 **Manufacturer 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:
  /manufacturers/suppliers:
    post:
      tags:
        - Manufacturer Integration
      summary: Connect User to NOX with Supplier OAuth
      description: >-
        Connects a manufacturer user to NOX with the intent of linking them to
        an energy supplier via OAuth. Creates or updates the subscriber record
        and returns a link_url where the user should be redirected to complete
        the supplier OAuth flow.
      operationId: connectSupplierManufacturer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SupplierManufacturerConnectionRequest'
            example:
              manufacturer_user_id: mfr_user_123
              device_ids:
                - device_001
                - device_002
              redirect_url: https://manufacturer-app.com/callback
              language: en
      responses:
        '201':
          description: >-
            Connection initiated successfully. Redirect user to link_url for
            OAuth flow.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupplierConnectionResponse'
        '400':
          description: Bad request - Invalid or missing parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: >-
            Unauthorized - Invalid API key or manufacturer not enabled for
            connection
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      deprecated: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SupplierManufacturerConnectionRequest:
      type: object
      required:
        - manufacturer_user_id
        - redirect_url
      properties:
        manufacturer_user_id:
          type: string
          description: The manufacturer's unique identifier for the user
          example: mfr_user_123
        device_ids:
          type: array
          items:
            type: string
          description: Optional list of device IDs to associate with this connection
          example:
            - device_001
            - device_002
        redirect_url:
          type: string
          format: uri
          description: >-
            URL where the user will be redirected after completing the supplier
            OAuth flow
          example: https://manufacturer-app.com/callback
        language:
          type: string
          description: >-
            Language code for the OAuth redirect page UI (e.g., 'en', 'nl',
            'fr')
          default: en
          example: en
    SupplierConnectionResponse:
      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: abc123def456ghi789
            link_url:
              type: string
              format: uri
              description: >-
                URL to redirect the user to for the supplier OAuth connection
                flow
              example: >-
                https://auth.sandbox.nox.energy/?token=abc123def456&connection_type=manufacturer
            expires_at:
              type: integer
              description: Unix timestamp when the link session expires
              example: 1703124056
            manufacturer:
              type: string
              description: Name of the manufacturer
              example: Daikin
            manufacturer_user_id:
              type: string
              description: The manufacturer's user ID that was provided
              example: mfr_user_123
            nox_user_id:
              type: string
              description: The NOX user ID assigned to this user
              example: 550e8400-e29b-41d4-a716-446655440000
            device_ids:
              type: array
              items:
                type: string
              description: List of device IDs associated with this connection
              example:
                - device_001
                - device_002
    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.

````