Google sheets API v4 Create sheet and invite users
I am using a service account authentication to create a google sheet using the Google Sheets API. I want to create a spreadsheet and somehow allow my team to open it. $private_key = file_get_contents($rootDir . '/config/googleApiCredentials.p12'); $client_email = 'project-names@positive-water-134xxx.iam.gserviceaccount.com'; $scopes = implode(' ', ["https://www.googleapis.com/auth/drive"]); $credentials = new \Google_Auth_AssertionCredentials( $client_email, $scopes, $private_key ); // tried once with additional constructor params: // $privateKeyPassword = 'notasecret', // $assertionType =