I am using Youtube data apiv3 with a client for Java.
YouTube.Channels.List channelRequest=youTube.channels().list("id, snippet, contentDetails");
channelRequest.setMine(true);
channelRequest.setMaxResults(10L);
channelRequest.setFields("items(id, snippet/title)");
channelRequest.setOauthToken(mToken);
ChannelListResponse channels = channelRequest.execute();
List<Channel>listOfChannels=channels.getItems();
I am requesting the channel ID of the authenticated user in this way, but even if the user has more than one channel, one response is not received.
If you have multiple channels under one account, how can you request it?
Because the account (token) and channel are one-to-one, only one channel is returned in one token.
When a user has multiple channels, a virtual account is created and associated with the second and subsequent channels.
o When authenticating Auth, users with multiple channels will see the "Channel Select" screen, and depending on the selected channel, another token will be returned.
https://stackoverflow.com/questions/26515743/youtube-api-channel-selector
It seems that the channel cannot be selected for OAuth2 authentication method currently built in Android.I will implement it on the webview.
© 2024 OneMinuteCode. All rights reserved.