• Модуль: socialservices
  • Путь к файлу: ~/bitrix/modules/socialservices/classes/general/google.php
  • Класс: CGoogleOAuthInterface
  • Вызов: CGoogleOAuthInterface::GetAuthUrl
public function GetAuthUrl($redirect_uri, $state = '', $apiKey = '')
{
	return static::AUTH_URL.
		"?client_id=".urlencode($this->appID).
		"&redirect_uri=".urlencode($redirect_uri).
		"&scope=".$this->getScopeEncode().
		"&response_type=code".
		"&access_type=offline".
		($this->refresh_token <> '' ? '' : '&approval_prompt=force').
		($state <> '' ? '&state='.urlencode($state) : '').
		($apiKey !== '' ? '&key=' . urlencode($apiKey) : '')
	;
}