Adds a text message or a poll to a live chat.
Provide a liveChatMessage resource in the request body with these required properties:
snippet.liveChatId: The live chat ID for the target broadcast.snippet.type: EithertextMessageEventorpollEvent.- For
textMessageEvent, includesnippet.textMessageDetails.messageText. - For
pollEvent(requires channel owner or content manager authorization, with at most one active poll per chat), includesnippet.pollDetails.metadatawith:questionText: Poll question text (up to 100 characters).options: Between 2 and 4 items displayed in the order listed, each settingoptionText(up to 35 characters). Do not settallyorsnippet.pollDetails.status.
For method-specific error responses, see liveChatMessages.insert errors. For code examples, see liveChatMessages.insert code snippets.
HTTP request
POST https://youtube.googleapis.com/youtube/v3/liveChat/messages
The URL uses gRPC Transcoding syntax.
Query parameters
| Parameters | |
|---|---|
part[] |
Required. Specifies the properties that the write operation sets and the resource parts that the API response includes. This parameter must include |
Request body
The request body contains an instance of LiveChatMessage.
Response body
If successful, the response body contains a newly created instance of LiveChatMessage.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/youtubehttps://www.googleapis.com/auth/youtube.force-ssl
For more information, see the OAuth 2.0 Overview.