code: def __make_http_query(self, params, topkey=''):
          
          if len(params) == 0:
              return ""
          result = ""
          # is a dictionary?
          if type(params) is dict:
              for key in params.keys():
                  newkey = quote(key)
                  if topkey != '':
                      newkey = topkey + quote('[' + key + ']')
                  if type(params[key]) is dict:
                      result += self.__make_http_query(params[key], newkey)
                  elif type(params[key]) is list:
                      i = 0
                      for val in params[key]:
                          if type(val) is dict:
                              result += self.__make_http_query(
                                  val, newkey + quote('['+str(i)+']'))
                          else:
                              result += newkey + \
                                  quote('['+str(i)+']') + "=" + \
                                  quote(str(val)) + "&"
                          i = i + 1
                  # boolean should have special treatment as well
                  elif type(params[key]) is bool:
                      result += newkey + "=" + \
                          quote(str(params[key]).lower()) + "&"
                  # assume string (integers and floats work well)
                  else:
                      result += newkey + "=" + quote(str(params[key])) + "&"
          # remove the last '&'
          if (result) and (topkey == '') and (result[-1] == '&'):
              result = result[:-1]
          return result
docs: Function to covert params into url encoded query string
          :param dict params: Json string sent  by Authy.
          :param string topkey: params key
          :return string: url encoded Query.