Skip to main content

Overview

LiveKit tokens provide secure, time-limited access to livestream rooms. The Pump.fun API provides separate endpoints for generating host tokens (with broadcasting permissions) and participant tokens (view-only access).

Get Host Token

Generate a LiveKit access token for the stream host with full broadcasting capabilities.

Endpoint

GET /livestreams/livekit/token/host

Query Parameters

mint
string
required
The token mint address for the livestream
creator
string
required
The wallet address of the stream creator/host

Example Request

curl -X GET "https://frontend-api-v3.pump.fun/livestreams/livekit/token/host?mint=<mint>&creator=<creator>" \
  -H "Authorization: Bearer <your_token>" \
  -H "Accept: application/json"

Response

Returns a LiveKit access token that can be used to connect to the stream as a host with broadcasting permissions.
Host tokens grant full permissions including video/audio publishing, screen sharing, and room management.

Get Participant Token

Generate a LiveKit access token for stream participants/viewers.

Endpoint

GET /livestreams/livekit/token/participant

Query Parameters

mint
string
required
The token mint address for the livestream
hidden
boolean
required
Whether the participant should be hidden from the participant list. Set to true for anonymous viewing or false for visible participants.

Example Request

curl -X GET "https://frontend-api-v3.pump.fun/livestreams/livekit/token/participant?mint=<mint>&hidden=false" \
  -H "Authorization: Bearer <your_token>" \
  -H "Accept: application/json"

Response

Returns a LiveKit access token that can be used to connect to the stream as a participant with view-only permissions.
Participant tokens provide view-only access by default. Users can watch the stream and participate in chat but cannot broadcast audio/video.

Authentication

Both endpoints require JWT authentication via the Authorization: Bearer <token> header.

Token Security

LiveKit tokens are time-limited credentials. Store them securely and do not share them publicly. Tokens should be generated on-demand when users need to join a stream.

Best Practices

  1. Generate tokens on-demand: Request new tokens when users join rather than pre-generating them
  2. Use appropriate permissions: Use host tokens only for authorized broadcasters
  3. Implement token refresh: Handle token expiration by requesting new tokens when needed
  4. Secure transmission: Always use HTTPS when transmitting tokens

Token Types Comparison

FeatureHost TokenParticipant Token
Video PublishingYesNo
Audio PublishingYesNo
Screen SharingYesNo
View StreamYesYes
Chat AccessYesYes
Visibility ControlAlways visibleConfigurable via hidden parameter

Common Use Cases

Token Launch Stream

  1. Creator obtains a host token to broadcast their token launch
  2. Viewers obtain participant tokens to watch and engage
  3. Use hidden=true for anonymous viewer counts
  4. Use hidden=false for visible community members

Interactive Sessions

  1. Primary host uses host token for main broadcast
  2. Featured guests can be promoted with appropriate permissions
  3. Audience uses participant tokens for viewing

Response Codes

  • 200 OK: Token generated successfully
  • 401 Unauthorized: Invalid or missing authentication token
  • 404 Not Found: Livestream with specified mint address not found
  • 400 Bad Request: Invalid query parameters

Create Livestream

Create a new livestream before generating tokens

Manage Stream

Control stream availability and access

Build docs developers (and LLMs) love