Skip to main content
POST
/
room
/
{id}
/
user
Go
package main

import(
	livepeergo "github.com/livepeer/livepeer-go"
	"context"
	"github.com/livepeer/livepeer-go/models/components"
	"log"
)

func main() {
    s := livepeergo.New(
        livepeergo.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
    )

    ctx := context.Background()
    res, err := s.Room.CreateUser(ctx, "<id>", components.RoomUserPayload{
        Name: "name",
        CanPublish: livepeergo.Bool(true),
        CanPublishData: livepeergo.Bool(true),
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.RoomUserResponse != nil {
        // handle response
    }
}
from livepeer import Livepeer

s = Livepeer(
    api_key="<YOUR_BEARER_TOKEN_HERE>",
)

res = s.room.create_user(id="<id>", room_user_payload={
    "name": "name",
    "can_publish": True,
    "can_publish_data": True,
})

if res.room_user_response is not None:
    # handle response
    pass
curl --request POST \
  --url https://livepeer.studio/api/room/{id}/user \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "name",
  "canPublish": true,
  "canPublishData": true,
  "metadata": "<string>"
}
'
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({name: 'name', canPublish: true, canPublishData: true, metadata: '<string>'})
};

fetch('https://livepeer.studio/api/room/{id}/user', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://livepeer.studio/api/room/{id}/user",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'name' => 'name',
    'canPublish' => true,
    'canPublishData' => true,
    'metadata' => '<string>'
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
HttpResponse<String> response = Unirest.post("https://livepeer.studio/api/room/{id}/user")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"name\",\n  \"canPublish\": true,\n  \"canPublishData\": true,\n  \"metadata\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://livepeer.studio/api/room/{id}/user")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"name\",\n  \"canPublish\": true,\n  \"canPublishData\": true,\n  \"metadata\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "d32ae9e6-c459-4931-9898-e86e2f5e7e16",
  "joinUrl": "https://meet.livepeer.chat",
  "token": "token"
}
{
  "errors": [
    [
      "id not provided",
      "Account not found"
    ]
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json
name
string
required

Display name

Example:

"name"

canPublish
boolean

Whether a user is allowed to publish audio/video tracks

Example:

true

canPublishData
boolean

Whether a user is allowed to publish data messages to the room

Example:

true

metadata
string

User defined payload to store for the participant

Response

Success

id
string

The ID of the user

Example:

"d32ae9e6-c459-4931-9898-e86e2f5e7e16"

joinUrl
string

Joining URL - use this for Livepeer's default meeting app (see the multiparticipant streaming guide for more info).

Example:

"https://meet.livepeer.chat"

token
string

Joining JWT - this can be used if you have a custom meeting app (see the multiparticipant streaming guide for more info).

Example:

"token"

Last modified on May 4, 2026