Google Apps Admin SDK Directory API 403 in PHP
问题 I'm getting Error calling GET https://www.googleapis.com/admin/directory/v1/users/email@example.com.com: (403) Not Authorized to access this resource/api when running $client = new Google_Client(); $client->setClientId(GOOGLEAPPS_CLIENT_ID); $client->setApplicationName(SITE_NAME); $key = file_get_contents(APPLICATION_PATH . 'googleapps-privatekey.p12'); $assertion = new Google_AssertionCredentials( GOOGLEAPPS_EMAIL_ADDRESS, // the service account name array('https://www.googleapis.com/auth