> ## 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.

# List a user's connections

> Get the connections of a user: through which providers NOX reaches the user's assets, and which
assets each connection gives access to. A user without connections gets an empty list.



## OpenAPI

````yaml /api-docs/connections/openapi-connections.json get /v2/connections
openapi: 3.1.0
info:
  title: NOX Energy API - Connections
  description: >
    # Connections API Documentation


    Connect a user's account at a provider (a device brand or a utility) to NOX
    Energy, and manage

    that access.


    ## Authentication


    1. Get your API key from [NOX Energy](mailto:support@nox.energy).

    2. Include the API key in your API calls with the header: `x-api-key:
    YOUR_API_KEY`.


    Base URL: [https://api.nox.energy](https://api.nox.energy)
  version: 1.0.0
servers:
  - url: https://api.nox.energy
    description: Production Server
security:
  - ApiKeyAuth: []
tags:
  - name: Connections
    description: API to connect your users' assets to NOX and manage those connections.
paths:
  /v2/connections:
    get:
      tags:
        - Connections
      summary: List a user's connections
      description: >-
        Get the connections of a user: through which providers NOX reaches the
        user's assets, and which

        assets each connection gives access to. A user without connections gets
        an empty list.
      operationId: get_connections_v2_connections_get
      parameters:
        - name: user_id
          in: query
          required: true
          schema:
            type: string
            description: 'Your own ID of the user: the ID you use internally for this user.'
            title: User Id
          description: 'Your own ID of the user: the ID you use internally for this user.'
        - name: provider
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Only the connection to this provider, e.g. `daikin`.
            title: Provider
          description: Only the connection to this provider, e.g. `daikin`.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '501':
          description: Called in the sandbox
          content:
            application/json:
              example:
                detail: Connections are not available in the sandbox.
        '502':
          description: The connections service failed
          content:
            application/json:
              example:
                detail: Connections service unavailable.
        '504':
          description: The connections service timed out
          content:
            application/json:
              example:
                detail: Connections service timed out.
components:
  schemas:
    ConnectionsResponse:
      properties:
        connections:
          items:
            $ref: '#/components/schemas/Connection'
          type: array
          title: Connections
          description: The user's connections, empty when there are none.
      type: object
      required:
        - connections
      title: ConnectionsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Connection:
      properties:
        connection_id:
          type: string
          title: Connection Id
          description: The ID of the connection.
        user_id:
          type: string
          title: User Id
          description: Your own ID of the user the connection belongs to.
        provider:
          type: string
          title: Provider
          description: The provider the assets are connected through, e.g. `daikin`.
        credential_type:
          type: string
          title: Credential Type
          description: >-
            How the connection authenticates: `oauth`, `app_credentials`,
            `manufacturer_identifier` or `ean`.
        assets:
          items:
            $ref: '#/components/schemas/ConnectionAsset'
          type: array
          title: Assets
          description: The assets reachable through this connection.
        status:
          type: string
          title: Status
          description: >-
            `pending`: the provider is still activating the account, which can
            take up to a day; no assets yet. `connected`: in use. `failed`:
            activation never completed, see `status_reason`; have the user
            connect again. `needs_reauth`: the credentials stopped working; have
            the user connect again.
        status_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Status Reason
          description: >-
            Why a connection is `failed` or `needs_reauth`, as a code. `null`
            otherwise.
        connected_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Connected At
          description: When the connection was made.
      type: object
      required:
        - connection_id
        - user_id
        - provider
        - credential_type
        - assets
        - status
      title: Connection
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ConnectionAsset:
      properties:
        asset_id:
          type: string
          title: Asset Id
          description: The NOX ID of the asset.
        asset_type:
          type: string
          title: Asset Type
          description: 'The type of the asset: `pv`, `bat` or `hp`.'
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: The ID of the asset at the provider.
      type: object
      required:
        - asset_id
        - asset_type
      title: ConnectionAsset
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 'API Key authentication. Enter your API key in the format: YOUR_API_KEY'

````

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