$client = new Google_Client(); $client->setScopes('https://www.googleapis.com/auth/drive');
$client = new Google_Client(); $client->setScopes([ 'https://www.googleapis.com/auth/drive', 'https://www.googleapis.com/auth/calendar' ]);This example sets the scopes required to access both the user's Google Drive and Calendar. Package Library: Google API PHP Client Library.