code: def get_tunnel_ad_url(self):
          ''' Get tunnel hostname from psiturk.org  '''
          req = requests.get('https://api.psiturk.org/api/tunnel',
                             auth=(self.access_key, self.secret_key))
          if req.status_code in [401, 403, 500]:
              print(req.content)
              return False
          else:
              return req.json()['tunnel_hostname'f get_tunnel_ad_url(self):
          ''' Get tunnel hostname from psiturk.org  '''
          req = requests.get('https://api.psiturk.org/api/tunnel',
                             auth=(self.access_key, self.secret_key))
          if req.status_code in [401, 403, 500]:
              print(req.content)
              return False
          else:
              return req.json()['tunnel_hostname']
docs: Get tunnel hostname from psiturk.org