code: def get_upload_token(mail, pwd):
      '''
      Get upload token
      '''
      try:
          params = urllib.urlencode({"email": mail, "password": pwd})
          response = urllib.urlopen(LOGIN_URL, params)
      except:
          return None
      resp = json.loads(response.read())
      if not resp or 'token' not in resp:
          return None
      return resp['token'f get_upload_token(mail, pwd):
      '''
      Get upload token
      '''
      try:
          params = urllib.urlencode({"email": mail, "password": pwd})
          response = urllib.urlopen(LOGIN_URL, params)
      except:
          return None
      resp = json.loads(response.read())
      if not resp or 'token' not in resp:
          return None
      return resp['token']
docs: Get upload token