Open LeoTheMoldyLemon opened 7 months ago
Personally, showing how to run a script using this wrapper would be best, but any sample using the API would be helpful.
$client = new Google\Client();
// Required, call the setAuthConfig function to load authorization credentials from // client_secret.json file. $client->setAuthConfig('client_secret.json');
// Required, to set the scope value, call the addScope function $client->addScope(Google\Service\Drive::DRIVE_METADATA_READONLY);
// Required, call the setRedirectUri function to specify a valid redirect URI for the // provided client_id $client->setRedirectUri('http://' . $_SERVER['HTTP_HOST'] . '/oauth2callback.php');
// Recommended, offline access will give you both an access and refresh token so that // your app can refresh the access token without user interaction. $client->setAccessType('offline');
// Recommended, call the setState function. Using a state value can increase your assurance that // an incoming connection is the result of an authentication request. $client->setState($sample_passthrough_value);
// Optional, if your application knows which user is trying to authenticate, it can use this // parameter to provide a hint to the Google Authentication Server. $client->setLoginHint('hint@example.com');
// Optional, call the setPrompt function to set "consent" will prompt the user for consent $client->setPrompt('consent');
// Optional, call the setIncludeGrantedScopes function with true to enable incremental // authorization $client->setIncludeGrantedScopes(true);
$client = new Google\Client();
// Required, call the setAuthConfig function to load authorization credentials from // client_secret.json file. $client->setAuthConfig('client_secret.json');
// Required, to set the scope value, call the addScope function $client->addScope(Google\Service\Drive::DRIVE_METADATA_READONLY);
// Required, call the setRedirectUri function to specify a valid redirect URI for the // provided client_id $client->setRedirectUri('http://' . $_SERVER['HTTP_HOST'] . '/oauth2callback.php');
// Recommended, offline access will give you both an access and refresh token so that // your app can refresh the access token without user interaction. $client->setAccessType('offline');
// Recommended, call the setState function. Using a state value can increase your assurance that // an incoming connection is the result of an authentication request. $client->setState($sample_passthrough_value);
// Optional, if your application knows which user is trying to authenticate, it can use this // parameter to provide a hint to the Google Authentication Server. $client->setLoginHint('hint@example.com');
// Optional, call the setPrompt function to set "consent" will prompt the user for consent $client->setPrompt('consent');
// Optional, call the setIncludeGrantedScopes function with true to enable incremental // authorization $client->setIncludeGrantedScopes(true);
This doesn't seem to be related to the request I made?
It's mentioned in the readme that we may request samples if we want them but can't find them, so I'm curious about any samples using the Google Apps Script API. If there is a sample which uses that API but I somehow missed it, I apologize.
Thanks in advance!