While configuring Keycloak connector in Midpoint, I am getting error “404 Not Found error.”

It requires below inputs in the configuration steps
Keycloak srver url
username
password
client id
client secret
realm name
target realm name
After entering the values it gives 404 Not found error in Testing the configuarion step.
Please help if anyone encountered with the same error in past.