Encode our password for sending with our request.
data = urllib.parse.urlencode({'password': password}) data = data.encode('utf-8')