code: def _get_access_token(self):
          
          if self._service_token:
              logger.info('Use service token: %s',
                          5 * '*' + self._service_token[50:])
              return self._service_token
  
          if not all([self.app_id, self._login, self._password]):
              raise ValueError(
                  'app_id=%s, login=%s password=%s (masked) must be given'
                  % (self.app_id, self._login,
                     '*' * len(self._password) if self._password else 'None'))
  
          logger.info("Getting access token for user '%s'" % self._login)
          with self.http_session as s:
              if self._client_secret:
                  url_query_params = self.do_direct_authorization(session=s)
              else:
                  self.do_login(http_session=s)
                  url_query_params = self.do_implicit_flow_authorization(session=s)
              logger.debug('url_query_params: %s', url_query_params)
  
          if 'access_token' in url_query_params:
              logger.info('Access token has been gotten')
              return url_query_params['access_token']
          else:
              raise VkAuthError('OAuth2 authorization error. Url params: %s'
                                % url_query_params)
docs: Get access token using app_id, login and password OR service token
          (service token docs: https://vk.com/dev/service_token