PHP - Getting Channel ID after OAuth - YouTube API PHP - Getting Channel ID after OAuth - YouTube API php php

PHP - Getting Channel ID after OAuth - YouTube API


You should add youtube.readonly scope, plugins like socialite have exactly this scope hardcoded. The channel snippet can be got via channels method - docs with part=snippet.

Readonly scope is light enough to include it to your list. userinfo.profile and yt-analytics.readonly don't have access to channels list. This scope is the only one needed to get channel id.


[EDIT]

Sorry, previously I missed auditDetails part. You can find YouTube API scopes here: YouTube API scopes

You most certainly need that one: https://www.googleapis.com/auth/youtube. I'm not sure about this one: https://www.googleapis.com/auth/youtube.force-ssl because of no explanation besides "force ssl" part.