I read the documentation page very attentively, but it won't work.
I'm trying to fetch posts from a stream, but I keep getting an error that the pageToken is invalid. Although this parameter is optional and can only be obtained after receiving a list of messages.
It is not working even on documentation page. To check - you can use 4xDzrJKXOOY id. Here is query:
curl \'https://youtube.googleapis.com/youtube/v3/liveChat/messages?liveChatId=4xDzrJKXOOY&part=snippet&key=[YOUR_API_KEY]' \ --header 'Authorization: Bearer ACCESS TOKEN' \ --header 'Accept: application/json' \ --compressedAnd here's what I get:
{"error": {"code": 400,"message": "page token is not valid.","errors": [ {"message": "page token is not valid.","domain": "youtube.liveChat","reason": "pageTokenInvalid" } ] }}Video id is absolutely valid, you can check it here.