OtotheA
OtotheA

Reputation: 513

Is there a way to insert live chat messages on behalf of oauth authenticated users?

I have an oauth app so users can authenticate their youtube account. I would like to be able to insert live chat messages on their behalf. I have attempted to submit live chat messages to the API using the authentication tokens for the users but it still shows the author of the message as my app. Is there a way to insert live chat messages on behalf of oauth authenticated users?

https://developers.google.com/youtube/v3/live/docs/liveChatMessages/insert

Note: I am posting this question here based on the instructions for youtube live api support found here https://developers.google.com/youtube/v3/live/support

Upvotes: 0

Views: 226

Answers (1)

OtotheA
OtotheA

Reputation: 513

After stepping away from this problem for a bit and returning to it I came to find that the API does post chat messages on behalf of the user when using their oauth tokens. My problem was in my application. I was not including access_type=offline in the url when authenticating the user. Without this parameter there is no refresh_token retrieved. My application logic was falling back to default tokens when the refresh token was not retrieved.

Upvotes: 0

Related Questions