POST request works in Postman, but not in Python Requests (200 response with robot detection) POST request works in Postman, but not in Python Requests (200 response with robot detection) curl curl

POST request works in Postman, but not in Python Requests (200 response with robot detection)


You are getting a 200 success response but not JSON data in the response.
This means that is just a response object. It contains only response code
to extract blob information from the response, convert response object to json
simply json_resp = response_raw.json()
This json_resp contains your actual response details.


I had a similar issue that I was able to resolve by sending a cookie in the request. Try this:

...my_cookie = {"Cookie": "cookie text..."}s = requests.Session()response_raw = s.post(url, json=payload, headers=headers, cookies=my_cookie)print(response_raw)print(response_raw.text)print(response_raw.content)

You can grab the cookie from the Network tab in the browser's Dev Tools console in the Request Headers section. It sounds like you may also be able to get the cookie using Python's CookieJar lib.


Try passing the verify option as false.

requests.get('https://example.com', verify=False)