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.UpdateUser(ctx, "<id>", "<value>", components.RoomUserUpdatePayload{
CanPublish: livepeergo.Bool(true),
CanPublishData: livepeergo.Bool(true),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.room.update_user(id="<id>", user_id="<value>", room_user_update_payload={
"can_publish": True,
"can_publish_data": True,
})
if res is not None:
# handle response
passcurl --request PUT \
--url https://livepeer.studio/api/room/{id}/user/{userId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"canPublish": true,
"canPublishData": true,
"metadata": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({canPublish: true, canPublishData: true, metadata: '<string>'})
};
fetch('https://livepeer.studio/api/room/{id}/user/{userId}', 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/{userId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'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.put("https://livepeer.studio/api/room/{id}/user/{userId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\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/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"canPublish\": true,\n \"canPublishData\": true,\n \"metadata\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"errors": [
[
"id not provided",
"Account not found"
]
]
}Rooms
Update Room User
deprecated
Livepeer Studio API endpoint
PUT
/
room
/
{id}
/
user
/
{userId}
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.UpdateUser(ctx, "<id>", "<value>", components.RoomUserUpdatePayload{
CanPublish: livepeergo.Bool(true),
CanPublishData: livepeergo.Bool(true),
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}from livepeer import Livepeer
s = Livepeer(
api_key="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.room.update_user(id="<id>", user_id="<value>", room_user_update_payload={
"can_publish": True,
"can_publish_data": True,
})
if res is not None:
# handle response
passcurl --request PUT \
--url https://livepeer.studio/api/room/{id}/user/{userId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"canPublish": true,
"canPublishData": true,
"metadata": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({canPublish: true, canPublishData: true, metadata: '<string>'})
};
fetch('https://livepeer.studio/api/room/{id}/user/{userId}', 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/{userId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'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.put("https://livepeer.studio/api/room/{id}/user/{userId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\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/{userId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"canPublish\": true,\n \"canPublishData\": true,\n \"metadata\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"errors": [
[
"id not provided",
"Account not found"
]
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Whether a user is allowed to publish audio/video tracks (i.e. their microphone and webcam)
Example:
true
Whether a user is allowed to publish data messages to the room
Example:
true
User defined payload to store for the participant
Response
Success
Last modified on May 4, 2026
Was this page helpful?
⌘I