• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/service.php
  • Класс: Bitrix\Seo\Service
  • Вызов: Service::register
static function register()
{
	static::clearClientsCache();

	$httpClient = new HttpClient();

	$queryParams = [
		"key" => static::getLicense(),
		"scope" => static::getEngine()->getInterface()->getScopeEncode(),
		"redirect_uri" => static::getRedirectUri(),
	];

	$result = $httpClient->post(static::SERVICE_URL.static::REGISTER, $queryParams);
	$result = Json::decode($result);

	if($result["error"])
	{
		throw new SystemException($result["error"]);
	}

	static::setAccessSettings($result);
}