I am getting a 400 error: ValidationError “Invalid identifier or password”. I am not sure why this is. I checked my username and password. I even created a second user with a simple email and password. No luck. I am pulling from an .env file. It also fails when I paste the email and password directly into the code.
Note I am running on a server, not localhost.
response = requests.post(f"{strapi_server_url}/api/auth/local",
headers={'Content-Type': 'application/json'},
json={'identifier': f"{admin_username}",
'password': f"{admin_password}",
})