Discord Activity

Watch Beam streams inside Discord.

Beam now has a dedicated Discord Activity route. Discord launches the Activity as an iframe, Beam initializes the Embedded App SDK, authenticates the viewer, and renders the Beam player inside the voice-channel experience.

Production routes

Activity iframe: https://beam.be-online.ro/discord/activity/
Preselected stream: https://beam.be-online.ro/discord/activity/?stream=sess_xxx
Config endpoint: GET /api/v1/discord/activity/config
OAuth exchange: POST /api/v1/discord/activity/token
Embedded player: /streams/player/?stream=sess_xxx

VPS environment

Set these variables on the Beam server before enabling the Activity in Discord.

BEAM_PUBLIC_BASE_URL=https://beam.be-online.ro
BEAM_DISCORD_CLIENT_ID=your_discord_application_client_id
BEAM_DISCORD_CLIENT_SECRET=your_discord_application_client_secret
BEAM_DISCORD_ACTIVITY_PATH=/discord/activity/

1. Create the Discord app

Create or open the Beam app in the Discord Developer Portal, then enable Activities for that application.

2. Add URL mapping

Point the Activity URL mapping to https://beam.be-online.ro/discord/activity/.

3. Configure scopes

Beam uses identify for viewer identity and rpc.activities.write for Discord presence.

4. Launch with a stream

Pass ?stream=sess_xxx when a Discord voice channel should open a specific Beam stream.

How the Activity works

  1. Discord opens the Beam Activity iframe.
  2. Beam loads Activity config from /api/v1/discord/activity/config.
  3. The frontend creates new DiscordSDK(clientId) and waits for ready().
  4. The Activity calls authorize, Beam exchanges the code server-side, then the Activity calls authenticate.
  5. Beam embeds the selected stream player and updates Discord rich presence.

Important limitation

Normal Discord link previews do not execute arbitrary Beam WebRTC JavaScript. For true in-Discord viewing, use the Discord Activity route. Link previews can still show rich Open Graph cards, but the playable live experience belongs in the Activity.