'Determine authentication type, set up appropriate authentication
connection and get initial authentication information.
:param  user_id: The email address (for service accounts) or Client ID
(for installed apps) to be used for authentication.
:type   user_id: ``str``
:param  key: The RSA Key (for service accounts) or file path containing
key or Client Secret (for installed apps) to be used for
authentication.
:type   key: ``str``
:keyword  auth_type: See GoogleAuthType class for list and description
of accepted values.
If not supplied, auth_type will be guessed based
on value of user_id or if the code is running
on a GCE instance.
:type     auth_type: ``str``
:keyword  credential_file: Path to file for caching authentication
information.
:type     credential_file: ``str``
:keyword  scopes: List of OAuth2 scope URLs. The empty default sets
read/write access to Compute, Storage, and DNS.
:type     scopes: ``list``'

def __init__(self, user_id, key=None, auth_type=None, credential_file=None, scopes=None, **kwargs):

    super(GoogleBaseConnection, self).__init__(user_id, key, **kwargs)
    self.oauth2_credential = GoogleOAuth2Credential(user_id, key, auth_type, credential_file, scopes, **kwargs)
    python_ver = ('%s.%s.%s' % (sys.version_info[0], sys.version_info[1], sys.version_info[2]))
    ver_platform = ('Python    %s/%s' % (python_ver, sys.platform))
    self.user_agent_append(ver_platform)
