Sending messages to a stream chat using the Youtube API

There is a problem with the Youtube API, I have been searching for the second day - I can't find anything.

Task: Use the Youtube API to send messages to the live broadcast chat.

Here are links to similar questions (unfortunately there is no answer to them:( ) :

Https://stackoverflow.com/questions/57082103/send-message-in-channel-chat-in-live-streaming-using-youtube-api

Youtube Chat stream Bot

Author: Volkodaff, 2020-01-18

1 answers

request = youtube.liveChatMessages().insert(
        part="snippet",
        body={
          "snippet": {
            "liveChatId": "YOUR_LIVE_CHAT_ID",
            "type": "textMessageEvent",
            "textMessageDetails": {
              "messageText": "текст сообщения"
            }
          }
        }
    )
 0
Author: Vladimir Afanasyev, 2020-01-18 19:23:14