Skip to content
SocialMate

SocialMate Local API

Cloudflare Tunnel

Reach your localhost API from the internet — a rotating Quick URL or a stable Named tunnel.

Your API lives on localhost and binds to 127.0.0.1 — invisible to the internet by design. To let a cloud service (n8n, Make, your store's webhook, a teammate) reach it, SocialMate ships a built-in Cloudflare Tunnel: no port-forwarding, no firewall changes, no inbound holes. cloudflared is auto-downloaded per platform and auto-reconnects if its process dies.

Quick vs Named

Quick tunnelNamed tunnel
TierFreePro
URLRotates each start — https://<random>.trycloudflare.comStable hostname you choose, unchanged across restarts
SetupOne click — nothing to configureShort wizard (Cloudflare account + token)
Best forTesting, demos, a quick integrationProduction webhooks & integrations that need a fixed URL

Because a Quick URL rotates, subscribe to the tunnel.url_changed webhook (a Free event) if anything external pins the address. The current URL is also stamped into every webhook payload as tunnelUrl.

Reading tunnel state

GET /v1/network/status

scope: readFree

{
  "data": {
    "tunnelUrl": "https://your-name.trycloudflare.com",
    "apiPort": 3456,
    "app": "SocialMate",
    "version": "2.0.0"
  }
}

tunnelUrl is null when no tunnel is running.

Calling through the tunnel

Swap localhost:3456 for your tunnel host — the x-api-key header works exactly the same. Keep your key secret: anyone with the URL and a valid key can reach your machine.

curl https://your-name.trycloudflare.com/v1/accounts \
  -H "x-api-key: YOUR_KEY"

Pro. A stable Named URL is the practical difference between "demo" and "production" — your webhooks and integrations never break on a restart. Compare plans →

Free forever · no card Download free