private function Settings::accessUrl in Google API PHP Client 8
Generate the Access Url.
See details at https://developers.google.com/identity/protocols/OAuth2WebServer?csw=1#f....
Return value
string URL.
1 call to Settings::accessUrl()
- Settings::buildForm in src/
Form/ Settings.php - Form constructor.
File
- src/
Form/ Settings.php, line 167
Class
- Settings
- Google API Settings.
Namespace
Drupal\google_api_client\FormCode
private function accessUrl() {
// This is required when developing and in need of refresh tokens.
// Refresh Tokens are only sent if this is set to force.
// Since we are explicitly asking the user to refresh tokens,
// its best to force this.
$this->googleApiClient->googleClient
->setApprovalPrompt("force");
// Generate a URL to request access from Google's OAuth 2.0 server.
return $this->googleApiClient->googleClient
->createAuthUrl();
}