Live Chat
List Broadcast Moderators
GET /2/broadcasts/chat/moderators returns the list of chat moderators for the authenticated user’s broadcasts.
GET
/
2
/
broadcasts
/
chat
/
moderators
List broadcast moderators
curl --request GET \
--url https://api.x.com/2/broadcasts/chat/moderators \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.x.com/2/broadcasts/chat/moderators"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.x.com/2/broadcasts/chat/moderators', 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://api.x.com/2/broadcasts/chat/moderators",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.x.com/2/broadcasts/chat/moderators"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.x.com/2/broadcasts/chat/moderators")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.x.com/2/broadcasts/chat/moderators")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"affiliation": {
"badge_url": "<string>",
"description": "<string>",
"url": "<string>",
"user_id": [
"<string>"
]
},
"confirmed_email": "<string>",
"connection_status": [
"blocking"
],
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"entities": {
"description": {
"cashtags": [
{
"end": 123,
"start": 123,
"tag": "<string>"
}
],
"hashtags": [
{
"end": 123,
"start": 123,
"tag": "<string>"
}
],
"mentions": [
{
"end": 123,
"start": 123,
"username": "<string>",
"id": "<string>"
}
],
"urls": [
{
"end": 123,
"start": 123,
"url": "<string>",
"description": "<string>",
"display_url": "<string>",
"expanded_url": "<string>",
"images": [
{
"height": 123,
"url": "<string>",
"width": 123
}
],
"media_key": "<string>",
"status": 123,
"title": "<string>",
"unwound_url": "<string>"
}
]
},
"url": {
"urls": [
{
"end": 123,
"start": 123,
"url": "<string>",
"description": "<string>",
"display_url": "<string>",
"expanded_url": "<string>",
"images": [
{
"height": 123,
"url": "<string>",
"width": 123
}
],
"media_key": "<string>",
"status": 123,
"title": "<string>",
"unwound_url": "<string>"
}
]
}
},
"id": "<string>",
"is_identity_verified": true,
"location": "<string>",
"most_recent_post_id": "<string>",
"name": "<string>",
"parody": true,
"pinned_post_id": "<string>",
"profile_banner_url": "<string>",
"profile_image_url": "<string>",
"protected": true,
"public_metrics": {
"followers_count": 123,
"following_count": 123,
"listed_count": 123,
"post_count": 123,
"like_count": 123,
"media_count": 123
},
"receives_your_dm": true,
"subscriber_count": 123,
"subscribes_to_you": true,
"subscription": {
"subscribes_to_you": true
},
"subscription_type": "<string>",
"url": "<string>",
"username": "<string>",
"verified": true,
"verified_followers_count": 123,
"verified_type": "<string>",
"withheld": {
"country_codes": [
"<string>"
],
"scope": "user"
}
}
],
"errors": [
{
"detail": "<string>",
"resource_type": "<string>",
"title": "<string>",
"type": "https://api.x.com/2/problems/resource-not-found",
"parameter": "<string>",
"resource_id": "<string>",
"status": 123,
"value": "<string>"
}
],
"meta": {
"result_count": 123
}
}{
"code": 123,
"message": "<string>"
}Returns the list of users who moderate chat for the authenticated user’s broadcasts. Moderators are scoped to the authenticated user, not to an individual broadcast, and take effect across every broadcast that user hosts.
Use the
user.fields query parameter to select which user fields are returned for each moderator. See User fields for the full list.
A user can have up to 20 moderators. To add or remove a moderator, use Add a Broadcast Moderator or Remove a Broadcast Moderator.
Authorizations
OAuth2UserTokenUserToken
The access token received from the authorization server in the OAuth 2.0 flow.
Query Parameters
A comma separated list of User fields to display. The fields available for a User object.
Minimum array length:
1Available options:
confirmed_email, connection_status, created_at, description, entities, id, is_identity_verified, location, name, parody, profile_banner_url, profile_image_url, protected, public_metrics, receives_your_dm, subscriber_count, subscribes_to_you, subscription, subscription_type, url, username, verified, verified_followers_count, verified_type, withheld ⌘I
List broadcast moderators
curl --request GET \
--url https://api.x.com/2/broadcasts/chat/moderators \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.x.com/2/broadcasts/chat/moderators"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.x.com/2/broadcasts/chat/moderators', 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://api.x.com/2/broadcasts/chat/moderators",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.x.com/2/broadcasts/chat/moderators"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.x.com/2/broadcasts/chat/moderators")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.x.com/2/broadcasts/chat/moderators")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"affiliation": {
"badge_url": "<string>",
"description": "<string>",
"url": "<string>",
"user_id": [
"<string>"
]
},
"confirmed_email": "<string>",
"connection_status": [
"blocking"
],
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"entities": {
"description": {
"cashtags": [
{
"end": 123,
"start": 123,
"tag": "<string>"
}
],
"hashtags": [
{
"end": 123,
"start": 123,
"tag": "<string>"
}
],
"mentions": [
{
"end": 123,
"start": 123,
"username": "<string>",
"id": "<string>"
}
],
"urls": [
{
"end": 123,
"start": 123,
"url": "<string>",
"description": "<string>",
"display_url": "<string>",
"expanded_url": "<string>",
"images": [
{
"height": 123,
"url": "<string>",
"width": 123
}
],
"media_key": "<string>",
"status": 123,
"title": "<string>",
"unwound_url": "<string>"
}
]
},
"url": {
"urls": [
{
"end": 123,
"start": 123,
"url": "<string>",
"description": "<string>",
"display_url": "<string>",
"expanded_url": "<string>",
"images": [
{
"height": 123,
"url": "<string>",
"width": 123
}
],
"media_key": "<string>",
"status": 123,
"title": "<string>",
"unwound_url": "<string>"
}
]
}
},
"id": "<string>",
"is_identity_verified": true,
"location": "<string>",
"most_recent_post_id": "<string>",
"name": "<string>",
"parody": true,
"pinned_post_id": "<string>",
"profile_banner_url": "<string>",
"profile_image_url": "<string>",
"protected": true,
"public_metrics": {
"followers_count": 123,
"following_count": 123,
"listed_count": 123,
"post_count": 123,
"like_count": 123,
"media_count": 123
},
"receives_your_dm": true,
"subscriber_count": 123,
"subscribes_to_you": true,
"subscription": {
"subscribes_to_you": true
},
"subscription_type": "<string>",
"url": "<string>",
"username": "<string>",
"verified": true,
"verified_followers_count": 123,
"verified_type": "<string>",
"withheld": {
"country_codes": [
"<string>"
],
"scope": "user"
}
}
],
"errors": [
{
"detail": "<string>",
"resource_type": "<string>",
"title": "<string>",
"type": "https://api.x.com/2/problems/resource-not-found",
"parameter": "<string>",
"resource_id": "<string>",
"status": 123,
"value": "<string>"
}
],
"meta": {
"result_count": 123
}
}{
"code": 123,
"message": "<string>"
}