guides

Save a stream key as a connection

Some platforms have no OAuth link — Facebook and Instagram today (pending platform app review), plus Rumble, X/Twitter, TikTok and anything custom. For those, TRaX stores the RTMP URL + stream key you paste from the platform's own dashboard as a manual connection, and destinations bind to it exactly like they bind to a linked YouTube or Twitch account.

Which host. These endpoints are on dev only for now: https://api-dev.traxstreaming.live/v1 with a dev key. This page will say so when they reach production.

Save the key once

POST /v1/connections/manual
Authorization: Bearer sk_live_…
Content-Type: application/json

{
  "platform": "facebook",
  "label": "My Facebook Page",
  "rtmpUrl": "rtmps://live-api-s.facebook.com:443/rtmp",
  "streamKey": "FB-…"
}

Requires connections:write. platform is free-form (facebook, instagram, rumble, twitter, tiktok, custom, …; empty defaults to custom) — it drives icons and labels, not behaviour. 201 returns the connection; its id is what CreateDestination.connectionId takes, so the flow is: save the key once, then create destinations against it from any studio.

The stream key is write-only. It is stored encrypted and never returned by any read on this API — not on create, not on the list, not on the patch. If you lose it, get it from the platform's dashboard, not from TRaX.

Update it later

PATCH /v1/connections/{connectionId}
Content-Type: application/json

{ "streamKey": "FB-NEW-…" }

A PATCH: only the fields you send change. Rename with label, repoint with rtmpUrl, rotate with streamKey — and an absent or empty streamKey keeps the stored key, so a rename never has to re-enter the secret. Destinations bound to the connection pick the new key up at the next go-live. Only manual connections accept this PATCH; an OAuth row answers 400 (its credentials are managed by the platform link). Unlinking is the same DELETE /v1/connections/{connectionId} as any other connection.

What you give up vs OAuth

A stream key authorizes exactly one thing: pushing video. So on stream-key platforms:

  • Chat is not available. There is no API grant to read the platform's chat with, so nothing shows up in unified chat for these destinations.
  • No broadcast management — the list/create/pick endpoints in the YouTube guide need a linked account.
  • The key never self-heals. If the platform rotates it, streams fail at go-live until you PATCH the new key in.