Google cloud and YouTube really have nothing to do with each other. Im not really sure what you are trying to do with it.
Unauthorized error
Sounds like you haven't set up the authorization properly. It should popup and request authorization of the user. You need to login to your code with the user that has access to the data you wish to see.
In this case if you want to see the channels owned by [email protected] then you would login as [email protected].
This example retrieves the channel data for the authorized user's YouTube channel. It uses the mine request parameter to indicate that the API should only return channels owned by the user authorizing the request.
mine only works with channels that are owned by the user you are logging in as.
// Load the Google API PHP Client Library.
require_once __DIR__ . '/vendor/autoload.php';
session_start();
$client = new Google_Client();
$client->setAuthConfig(__DIR__ . '/client_secrets.json');
$client->addScope(Google_Service_YouTube::YOUTUBE_READONLY);
// If the user has already authorized this app then get an access token
// else redirect to ask the user to authorize access to Google Analytics.
if (isset($_SESSION['access_token']) && $_SESSION['access_token']) {
// Set the access token on the client.
$client->setAccessToken($_SESSION['access_token']);
// Create an authorized analytics service object.
$service = new Google_Service_YouTube($client);
}
Google workspace
Access to YouTube during your Google Workspace trial
Your Google Workspace account has been billed for at least USD $30 (or equivalent in your currency). This amount doesn’t include the cost to purchase your domain.
If you’ve had your account for 30 days and you signed up for Google Workspace directly from Google: You can make an early payment or pay for more users accounts to access all YouTube features. After you make the payment, it might take up to 48 hours before features are available.