The docs for ‘channel.shoutout.create’ and ‘channel.shoutout.receive’ EventSub subscriptions note ‘broadcaster_user_id’ as optional and ‘moderator_user_id’ as required in the ‘condition’, yet not setting the ‘broadcaster_user_id’ when trying to subscribe throws a validation error:
data {
error: 'Bad Request',
status: 400,
message: "unknown validation error: Key: 'SubscriptionCondition.broadcaster_user_id' Error:Field validation for 'broadcaster_user_id' failed on the 'required' tag"
}
config {
transitional: {
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
},
adapter: [ 'xhr', 'http' ],
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: {
FormData: [Function: FormData] {
LINE_BREAK: '\r\n',
DEFAULT_CONTENT_TYPE: 'application/octet-stream'
},
Blob: null
},
validateStatus: [Function: validateStatus],
headers: AxiosHeaders {
Accept: 'application/json, text/plain, */*',
'Content-Type': 'application/json',
Authorization: '<redacted>',
'Client-Id': '<redacted>',
'User-Agent': 'axios/1.2.2',
'Content-Length': '175',
'Accept-Encoding': 'gzip, compress, deflate, br'
},
method: 'post',
url: 'https://api.twitch.tv/helix/eventsub/subscriptions',
data: '{"type":"channel.shoutout.create","version":"beta","condition":{"moderator_user_id":"<redacted>"},"transport":{"method":"websocket","session_id":"<redacted>"}}'
}
The same happens if only providing the ‘broadcaster_user_id’.
It only works when providing both at the moment.