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

# List VPN Configurations

> Returns a list of active VPN configurations the authenticated user has access to.



## OpenAPI

````yaml GET /auth/vpn-configs
openapi: 3.0.0
info:
  title: ClosedVPN API
  version: 1.1.0
  description: >
    API for managing authentication, organizations, members, VPN configurations,

    certificates and usage reporting for the ClosedVPN platform.


    The VPN capability previously delivered through the OneFirewall Application

    (`https://app.onefirewall.com/api/v1/vpn`) now runs on ClosedVPN and is
    served

    from `https://closedvpn.io`. The legacy OneFirewall VPN endpoints are
    deprecated

    and replaced by the operations documented here.


    Most endpoints require a Personal Access Token (PAT), sent as

    `Authorization: Bearer <pat>`. To obtain one, sign in through the magic link

    flow (`/auth/send-magic-link` then `/auth/verify-magic-link`, neither of
    which

    requires prior authentication) and then call `/auth/generate-pat`, or create
    the

    token from the Profile page in the web application. The plaintext token is
    shown

    only once and is stored as a bcrypt hash, so it cannot be recovered later.
  contact:
    name: OneFirewall Alliance
    url: https://closedvpn.io
    email: support@onefirewall.com
servers:
  - url: https://closedvpn.io
    description: Production server
security: []
tags:
  - name: Authentication
    description: Magic link sign-in, session validation and sign-out.
  - name: Profile
    description: Read and update the authenticated user's profile.
  - name: Personal Access Tokens
    description: Create, list and revoke Personal Access Tokens used for API access.
  - name: Organizations
    description: Create, update, list, select and delete organizations.
  - name: Members
    description: Add members to an organization, change their role and remove them.
  - name: VPN Certificates
    description: Issue and download the OpenVPN client profile for a member.
  - name: VPN Configurations
    description: Manage VPN server configurations and run their predefined commands.
  - name: VPN Exit Nodes
    description: List the VPN exit nodes available to the caller.
  - name: Statistics
    description: Connection status, traffic reporting and threat prevention metrics.
  - name: Notifications
    description: Read in-app notifications and mark them as read.
  - name: Activity Logs
    description: Retrieve the caller's recent activity.
paths:
  /auth/vpn-configs:
    get:
      tags:
        - VPN Configurations
      summary: List all VPN configurations
      description: >-
        Returns a list of active VPN configurations the authenticated user has
        access to.
      operationId: getVPNConfigs
      responses:
        '200':
          description: VPN configurations retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  vpnConfigs:
                    type: array
                    items:
                      $ref: '#/components/schemas/VPNConfig'
        '401':
          description: Unauthorized (invalid or missing PAT)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Unauthorized
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Error fetching VPN configurations
      security:
        - bearerAuth: []
components:
  schemas:
    VPNConfig:
      type: object
      properties:
        _id:
          type: string
          example: 60c72b2f5f1b2c001c8e4b2a
        name:
          type: string
          example: Frankfurt Node
        config:
          $ref: '#/components/schemas/VPNConfigBody'
        users:
          type: array
          items:
            type: string
            format: email
        active:
          type: boolean
          example: true
        createdAt:
          type: integer
          format: int64
          description: Unix epoch milliseconds
          example: 1735689600000
        updatedAt:
          type: integer
          format: int64
          description: Unix epoch milliseconds
          example: 1735689600000
    VPNConfigBody:
      type: object
      description: >
        Configuration document for a VPN server. Additional keys are stored and
        returned unchanged. The `commands` and `private` sections are required
        for certificate issuance and user statistics to work.
      properties:
        location:
          type: string
          example: Frankfurt, Germany
        coordinates:
          type: array
          description: >
            Node position as [latitude, longitude]. Defaults to [0, 0] if not a
            two-element array.
          items:
            type: number
          minItems: 2
          maxItems: 2
          example:
            - 50.1109
            - 8.6821
        usage_percentage:
          type: number
          description: Current load as a percentage. Defaults to 0.
          example: 45
        img:
          type: string
          description: Flag or icon path. Defaults to /img/countries/DF.png.
          example: /img/countries/DE.png
        access:
          type: array
          description: >
            Emails permitted to read and modify this configuration. The creator
            is always added automatically.
          items:
            type: string
            format: email
          example:
            - admin@example.com
        orgs:
          type: array
          description: ObjectIds of organizations assigned to this VPN
          items:
            type: string
        commands:
          type: object
          additionalProperties:
            type: string
          description: >
            Named shell commands run over SSH on the VPN host. `create_cert` is
            required by `/auth/download-certificate` and `get_users_stats` by
            `/auth/vpn-user-stats`. Occurrences of `CLIENT_NAME` are replaced at
            run time with the requesting member's client identifier.
          example:
            create_cert: /opt/vpn/create-client.sh CLIENT_NAME
            get_users_stats: /opt/vpn/user-stats.sh CLIENT_NAME
        private:
          type: object
          description: >
            SSH connection details for the VPN host. Stripped from
            `/auth/vpn-exit-nodes` responses.
          properties:
            server:
              type: string
              example: vpn-fra.closedvpn.io
            port:
              type: integer
              default: 22
              example: 22
            user:
              type: string
              example: vpnadmin
            ssh_public_key:
              type: string
              description: >
                Generated by the platform when the configuration is created.
                Install it on the VPN host so the platform can connect.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: PAT
      description: >
        Personal Access Token (PAT) passed in the Authorization header (e.g.,
        `Bearer <pat>`) for authenticated API requests. PATs are generated via
        `/auth/generate-pat` after authenticating through the magic link flow.

````