title: httplib2.ServerNotFoundError: Unable to find the server at www.googleapis.com
body: <p>When i try to fetch the details of gmail using google-api's (googleapiclient,oauth2client), i am getting below error:</p>
  
  <pre><code> File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/local/lib/python2.7/site-packages/google_api_python_client-1.7.8-py2.7.egg/googleapiclient/_helpers.py", line 130, in positional_wrapper
  
    File "/usr/local/lib/python2.7/site-packages/google_api_python_client-1.7.8-py2.7.egg/googleapiclient/discovery.py", line 224, in build
  
    File "/usr/local/lib/python2.7/site-packages/google_api_python_client-1.7.8-py2.7.egg/googleapiclient/discovery.py", line 274, in _retrieve_discovery_doc
    File "/usr/local/lib/python2.7/site-packages/httplib2-0.12.1-py2.7.egg/httplib2/__init__.py", line 2135, in request
      cachekey,
    File "/usr/local/lib/python2.7/site-packages/httplib2-0.12.1-py2.7.egg/httplib2/__init__.py", line 1796, in _request
      conn, request_uri, method, body, headers
    File "/usr/local/lib/python2.7/site-packages/httplib2-0.12.1-py2.7.egg/httplib2/__init__.py", line 1707, in _conn_request
  
      raise ServerNotFoundError("Unable to find the server at %s" % conn.host)
  httplib2.ServerNotFoundError: Unable to find the server at www.googleapis.com
  </code></pre>
  
  <p>but it is working fine in my pc but not from remote location.</p>
  
  <p>code:</p>
  
  <pre><code>from googleapiclient.discovery import build
  from oauth2client.service_account import ServiceAccountCredentials
  
  credentials = ServiceAccountCredentials.from_json_keyfile_name(
              "quickstart-1551349397232-e8bcb3368ae1.json", scopes=
  ['https://www.googleapis.com/auth/admin.directory.group',                                                                  'https://www.googleapis.com/auth/admin.directory.user',                                                                  'https://www.googleapis.com/auth/admin.directory.domain',                                                                  'https://www.googleapis.com/auth/gmail.readonly'])
  
  delegated_credentials = credentials.create_delegated('jango@carbonitedepot.com')
  
  DIRECOTORY = build('admin', 'directory_v1', credentials=delegated_credentials)
  
  try:
      results = DIRECOTORY.users().list(customer='my_customer').execute()   
      users = results.get('users', [])    
      res = []    
      for info in users:         
      print(info)          
      res.append(info.get("primaryEmail"))
      print(res)
  except Exception as e:
      print(e)
  </code></pre>
  
  <p>Any help would be much appreciated.</p>
  
  <p>Thanks in advance.</p>