I'd like to know a users YouTube channel ID after he logs in with his YouTube account. I did find his Google Plus ID but I can't translate that into his YouTube username or channel ID.
I added a Youtube API request to the social login code. I used the access token that was received from Google by Social Login to authorize the request:
Answers
you can pull his videos and channel using this endpoint:
http://docs.oneall.com/api/resources/identities/youtube/list-videos/
Does that work for you? Or do you only need the channel?
Regards,
Actually I don't need the video's. I need the number of subscribers.
$data =file_get_contents("https://www.googleapis.com/youtube/v3/channels?part=snippet&mine=true&access_token=".$access_token);
But Google returns an HTTP 403 response code.