Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

Unclear how to get Youtube OAUTH credentials for channel I have access to

$
0
0

I have been granted manager access to a channel by another user. To accept the invite, I first had to create a channel (my personal channel) and then accept the invite.

In the Youtube UI, I can switch between my channel, and the channel I have access to. I can also reply to comments on the channels videos as the channel (so the comments come from the channel's name).

I'm trying to do the same thing with the API. I have some experience with using Google APIs (I have successfully used OAUTH2 to respond to Google My Business reviews).

I have been able to respond to comments on the channel videos via the API, but when I do, they come from my personal account name. It appears I need to have an access token that is in the scope of the channel, but this is where I'm having trouble.

I have created my Google web client ID and consent page and enabled the Youtube APIs. I then create the Auth URL using the oauth2 client. I am passing in all of the youtube scopes:

"https://www.googleapis.com/auth/youtube","https://www.googleapis.com/auth/youtube.channel-memberships.creator","https://www.googleapis.com/auth/youtube.readonly","https://www.googleapis.com/auth/youtubepartner","https://www.googleapis.com/auth/youtube.upload","https://www.googleapis.com/auth/youtube.force-ssl","https://www.googleapis.com/auth/youtubepartner-channel-audit",

I log in with the GMAIL that is also the one that has access to the channel. I get all of the "warning, this APP will have access to your YOUTUBE" messages. If I accept, then I get the callback and the access tokens, which I save the refresh token on the initial authorization, and use this to exchange for access tokens in the future. This is also how I did it for Google Business using the business scopes.

When I use this token to reply to a comment on a video for the channel, it comes from my personal user, which makes sense.

I have read that the token needs to be scoped to the channel, rather than my gmail/personal youtube channel, but I don't get a selection asking me to pick a channel as I go through the auth process.

What step am I missing to get the access token with the scope of one of the channels I am managing?


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>