Unfortunately, that's how it is in the code. We encountered the same problem, and had to create a custom REST endpoint to use the `email-verification.ftl` template.
On Thu, Apr 29, 2021, at 6:54 PM, Moritz Schmitz von Huelst wrote:
> When setting 'Verify email' to 'true' in the realm settings and
> registering a user through Keycloak an email is sent to the user. The
> template used is 'email-verification.ftl'.
>
> When having the same realm setting but creating a user through the REST
> API 'POST /{realm}/users' the email is *not* sent. There is a REST API
> method 'PUT /{realm}/users/{id}/send-verify-email' available, but it
> uses a different email template 'executeActions.ftl'.
>
> My expectation is Keycloak to send out an email 'normally' when the
> realm setting requires to verify your email. No matter whether you use
> the REST API or the UI.
>
> Is there any fix/workaround to this?
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Keycloak User" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
keycloak-use...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/keycloak-user/14d674c8-6c0e-42c3-ad4f-70a2b8cbb7b3n%40googlegroups.com <
https://groups.google.com/d/msgid/keycloak-user/14d674c8-6c0e-42c3-ad4f-70a2b8cbb7b3n%40googlegroups.com?utm_medium=email&utm_source=footer>.