v2

latestOpenAPI 3.1.02026-07-2675166192.8 KB
Tunnel

Create Tunnel Endpoint

Create a new tunnel for exposing a local service.

post/api/v1/tunnel

Request body

namestring nullable

Optional friendly name for the tunnel

local_portinteger

Local port the tunnel will forward traffic to

teamIdstring nullable

Team ID for team tunnels

labelsstring[]

Labels/tags for the tunnel

httpUserstring nullable

Username for HTTP basic auth on tunnel traffic. Setting this enables auth; the password is auto-generated server-side and returned once in the create response.

Response

Successful Response

tunnel_idstring required

Unique tunnel identifier

hostnamestring required

Full hostname for the tunnel

urlstring required

Full HTTPS URL for accessing the tunnel

frp_tokenstring required

Authentication token for frpc client

binding_secretstring required

Per-tunnel secret for additional authentication via frpc metadata

server_hoststring required

frps server hostname

server_portinteger

frps server port

expires_atstring date-time required

Token expiration timestamp

labelsstring[]

Tunnel labels

http_userstring nullable

HTTP basic auth username, if auth is enabled

http_passwordstring nullable

Auto-generated HTTP basic auth password, if auth is enabled. Only returned at creation; stored encrypted and never retrievable afterwards.