79589544

Date: 2025-04-23 21:55:22
Score: 5
Natty: 4
Report link

I am getting this message Response Text: {"code": 40002, "message": "Invalid request parameters", "message_detail": "no capable device", "stat": "FAIL"} in python. Any thoughts on how to resolve this? It seems to be working fine when i give the factor with sms but not with push. Currently we do have it working on other areas and we push it over the phone. Any idea on how to fix this? Below are the options i am using.

username = "xyz"

factor = "push"

device = "auto"

method = "POST"

the rest of the information seems to be fine as it is pushing sms codes to the phone.

params = {
    "username": username,
    "factor": factor,
    "device": device
}
print("\nParams:", params)  # Ensure it exists before using it
# Sort & encode parameters
param_string = "&".join(f"{urllib.parse.quote(k)}={urllib.parse.quote(v)}" for k, v in sorted(params.items()))
# Send request to Duo
duo_url = f"https://{host}{path}"
headers = {
    "Authorization": auth_header,
    "User-Agent": "Duo Python Client",
     "X-Duo-Date":  date 
}
response = requests.post(duo_url, headers=headers, data=params)
Reasons:
  • Blacklisted phrase (1.5): Any thoughts
  • RegEx Blacklisted phrase (1.5): how to resolve this?
  • RegEx Blacklisted phrase (1.5): how to fix this?
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user30355711