# Keycloak Admin Client : Generate OTP

**URL:** <https://forum.keycloak.org/t/keycloak-admin-client-generate-otp/23788>\
**Category:** Getting advice\
**Tags:** admin-console, admin-rest, authentication\
**Created:** [December 19, 2023, 10:33am UTC](https://forum.keycloak.org/t/keycloak-admin-client-generate-otp/23788 "2023-12-19T10:33:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MalekBenRabah](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@MalekBenRabah](https://forum.keycloak.org/u/MalekBenRabah)\
**Post date:** [December 19, 2023, 10:33am UTC](https://forum.keycloak.org/t/keycloak-admin-client-generate-otp/23788/1 "2023-12-19T10:33:55Z")

</div>

I’m relatively new to the Keycloak admin client and I’m aiming to set up authentication using OTP without relying on Google Authenticator. My goal is to generate the OTP code and have it sent to users via email. Could someone guide me on how to achieve this using the Keycloak admin client?

---

<div class="post-metadata">

**Author:** ![xgp](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/xgp/32/2589_2.png) [@xgp](https://forum.keycloak.org/u/xgp)\
**Post date:** [December 20, 2023, 5:41pm UTC](https://forum.keycloak.org/t/keycloak-admin-client-generate-otp/23788/3 "2023-12-20T17:41:55Z")

</div>

There is not a native Keycloak feature that does that. However, I have written an email OTP extension here:

> **[GitHub - p2-inc/keycloak-magic-link: Magic Link Authentication for Keycloak](https://github.com/p2-inc/keycloak-magic-link?tab=readme-ov-file#email-otp)**
>
> Magic Link Authentication for Keycloak. Contribute to p2-inc/keycloak-magic-link development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![ThoreKr](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/thorekr/32/7713_2.png) [@ThoreKr](https://forum.keycloak.org/u/ThoreKr)\
**Post date:** [January 1, 2024, 3:20pm UTC](https://forum.keycloak.org/t/keycloak-admin-client-generate-otp/23788/4 "2024-01-01T15:20:23Z")

</div>

As a sidenote. Google Authenticator is just one implementation of the TOTP standard. There are countless alternatives you could use. To name a few

- FreeOTP
- Authy
- Yubico Authenticator
- 1Password
- …

Even the configuration page in the account console lists Google Authenticator and FreeOTP as options.
