Getting 500 on execute-actions-email API

Details of the API are as follows:
API: https://{servername:port}/auth/admin/realms/{realm}/users/{userId}/execute-actions-email
Request body: [“UPDATE_PASSWORD”]

Screenshot of the error is attached as below:
failed send email

Please help me.

Thanks in advance.

@divya did you ever get it to work?

A few ideas:

  1. Do you have your SMTP settings configured properly? I.e. can you go into the “Realm Settings”->“Email” tab of the admin UI and click “Test connection”.
  2. Does the user you are calling the method for have an email address set?
  3. Have you looked in the Keycloak logs to see if there is an exception thrown?
1 Like

@xgp where can I check the keycloak logs exactly ?
I’m running my keycloak server both locally and from a docker container

If you are running via docker the docker logs command is your friend: docker logs | Docker Documentation
In the container, logs should be in /opt/jboss/keycloak/standalone/log/
Also, depending on your command to startup the docker container, it also usually outputs to stdout.

If you are running locally from the distribution, logs are in <keycloak_dir>/standalone/log/