API

Overview

Base URL, auth, and what the HTTP API is for.

Base URL: https://api.portlify.ru. JSON in and out. Send Authorization: Bearer <token>.

Two kinds of token:

  • JWT from POST /auth/login or POST /auth/register
  • API key starting with plfy_ from POST /keys or the CLI
A session from POST /tunnels/session is only for the agent WebSocket. It does not replace the CLI for opening a tunnel.
curl
curl https://api.portlify.ru/tunnels \
  -H "Authorization: Bearer plfy_…"