• Модуль: socialservices
  • Путь к файлу: ~/bitrix/modules/socialservices/classes/general/bitrix24.php
  • Класс: CSocServBitrixOAuth
  • Вызов: CSocServBitrixOAuth::getAccessToken
public function getAccessToken($code, $addScope = null)
{
	$this->getEntityOAuth()->setCode($code);
	if($addScope !== null)
	{
		$this->getEntityOAuth()->addScope($addScope);
	}

	$this->getEntityOAuth()->GetAccessToken($this->redirectURI);

	return $this->getEntityOAuth()->getToken();
}