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

# VPN-приложения

> Для экрана «Как подключиться»: платформы, приложения со ссылками на установку и рекомендованное приложение. `app_id` совпадает с `subscription.connect[].app_id` клиента. Подписи — на языке из `Accept-Language` (`ru` или `en`, без заголовка — `en`).



## OpenAPI

````yaml GET /api/partner/v1/apps
openapi: 3.1.0
info:
  title: VARGO Partner API
  version: '1.0'
  description: >-
    REST API для продажи VPN в своём боте, мини-аппе или на сайте: тарифы,
    счета, клиенты и их устройства. Клиент платит платформе, наценка партнёра
    начисляется на его баланс.


    Ключ партнёра — в заголовке `Authorization: Bearer vgo_live_…`, его выдаёт
    платформа. Ключ живёт только на сервере партнёра: в коде мини-аппа или сайта
    его быть не должно. Деньги — строки в рублях (`"150.00"`), даты — ISO-8601
    UTC. Ошибки — `{error: {code, message, fields}}`: ветвиться по `code`,
    `message` клиенту не показывать.
servers:
  - url: https://api.vargopartners.com
security:
  - PartnerKey: []
paths:
  /api/partner/v1/apps:
    get:
      tags:
        - Partner API
      summary: VPN-приложения
      description: >-
        Для экрана «Как подключиться»: платформы, приложения со ссылками на
        установку и рекомендованное приложение. `app_id` совпадает с
        `subscription.connect[].app_id` клиента. Подписи — на языке из
        `Accept-Language` (`ru` или `en`, без заголовка — `en`).
      operationId: get_apps_api_partner_v1_apps_get
      responses:
        '200':
          description: Приложения и ссылки на установку
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiApps'
        '401':
          description: >-
            Ключ не принят: `UNAUTHORIZED`. Неверный и отозванный ключ,
            выключенный доступ к API — один ответ
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: >-
            Запрос не прошёл проверку: `code` — `VALIDATION_ERROR`, в `fields` —
            поле и причина
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: >-
            Превышен лимит: `RATE_LIMITED` — повторить после паузы из
            `Retry-After`. У суточных лимитов (`NEW_CLIENTS_DAILY_LIMIT`,
            `TRIAL_DAILY_LIMIT`) заголовка нет — повторять на следующие сутки
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          headers:
            Retry-After:
              description: >-
                Пауза в секундах до повтора; есть у `RATE_LIMITED` и
                `LINK_ROTATE_TOO_SOON`
              schema:
                type: integer
                minimum: 1
        default:
          description: >-
            Ошибка — тот же конверт; ветвиться по `code`, список кодов — в
            документации
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    ApiApps:
      properties:
        platforms:
          items:
            $ref: '#/components/schemas/ApiPlatform'
          type: array
          title: Platforms
          description: Платформы в порядке показа
        apps:
          items:
            $ref: '#/components/schemas/ApiApp'
          type: array
          title: Apps
          description: VPN-приложения
        recommended_app_id:
          type: string
          title: Recommended App Id
          description: Приложение, которое советовать по умолчанию
          examples:
            - happ
      type: object
      required:
        - platforms
        - apps
        - recommended_app_id
      title: ApiApps
    ApiError:
      description: 'Конверт любой ошибки: статус HTTP плюс `error.code`.'
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
          description: Код, текст и поля ошибки
      required:
        - error
      title: ApiError
      type: object
    ApiPlatform:
      properties:
        platform_id:
          type: string
          title: Platform Id
          description: Код платформы — ключ в `downloads` приложения
          examples:
            - ios
        name:
          type: string
          title: Name
          description: Название платформы для клиента
          examples:
            - iPhone
      type: object
      required:
        - platform_id
        - name
      title: ApiPlatform
    ApiApp:
      properties:
        app_id:
          type: string
          title: App Id
          description: Код приложения
          examples:
            - happ
        name:
          type: string
          title: Name
          description: Название приложения
          examples:
            - Happ
        downloads:
          additionalProperties:
            items:
              $ref: '#/components/schemas/ApiDownload'
            type: array
          type: object
          title: Downloads
          description: 'Ссылки на установку по платформам: ключ — `platform_id`'
      type: object
      required:
        - app_id
        - name
        - downloads
      title: ApiApp
    ApiErrorBody:
      properties:
        code:
          description: Машиночитаемый код ошибки — ветвиться по нему
          examples:
            - VALIDATION_ERROR
          title: Code
          type: string
        message:
          description: >-
            Текст для логов на языке из `Accept-Language` (`ru` или `en`);
            клиенту не показывать
          title: Message
          type: string
        fields:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          description: Поле → причина у `VALIDATION_ERROR`; у остальных ошибок `null`
          title: Fields
      required:
        - code
        - message
        - fields
      title: ApiErrorBody
      type: object
    ApiDownload:
      properties:
        label:
          type: string
          title: Label
          description: Подпись ссылки для клиента
          examples:
            - App Store
        url:
          type: string
          title: Url
          description: Ссылка на установку приложения
      type: object
      required:
        - label
        - url
      title: ApiDownload
  securitySchemes:
    PartnerKey:
      type: http
      scheme: bearer
      description: >-
        Ключ партнёра `vgo_live_…`, его выдаёт платформа. Хранится только на
        сервере партнёра.

````