# How to get MFA API Access Tokens?

**URL:** <https://community.auth0.com/t/how-to-get-mfa-api-access-tokens/101409>\
**Category:** Get Help\
**Tags:** mfa-api, mfa\
**Created:** [February 27, 2023, 7:56pm UTC](https://community.auth0.com/t/how-to-get-mfa-api-access-tokens/101409 "2023-02-27T19:56:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjamin\_mumma](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/benjamin_mumma/32/33412_2.png) [@benjamin\_mumma](https://community.auth0.com/u/benjamin_mumma)\
**Post date:** [February 27, 2023, 7:56pm UTC](https://community.auth0.com/t/how-to-get-mfa-api-access-tokens/101409/1 "2023-02-27T19:56:37Z")

</div>

Hello,

We are attempting to create a page on our site that will allow the user to to enroll in MFA with a phone number they provide.

We are attempting to leverage the MFA API to acomplish this task, however we are struggling to gain an MFA API Token.

The documentation, found [here](https://auth0.com/docs/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa/manage-authenticator-factors-mfa-api#resource-owner-password-grant), is vague in attempting to retrieve a token WITHOUT the login flow.

The documentation indicates, “If you are building a user interface to manage authentication factors, you’ll need to obtain a token you can use for the MFA API at any moment, not only during authentication.”

How do we go about obtaining this token? Is there an endpoint I’m missing to retrieve an MFA token?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [February 28, 2023, 12:57am UTC](https://community.auth0.com/t/how-to-get-mfa-api-access-tokens/101409/3 "2023-02-28T00:57:35Z")

</div>

Hi there @benjamin_mumma!

> [@benjamin\_mumma](#):
>
> We are attempting to leverage the MFA API to acomplish this task, however we are struggling to gain an MFA API Token.
> 
> The documentation, found [here](https://auth0.com/docs/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa/manage-authenticator-factors-mfa-api?_gl=1*kd9d7j*rollup_ga*MTk4MjEzNTM2OC4xNjc1ODE3ODky*rollup_ga_F1G3E656YZ*MTY3NzU0MTM3OS4zMi4xLjE2Nzc1NDQ2NjguNTguMC4w&_ga=2.55175147.1543178604.1677532717-1982135368.1675817892&_gac=1.27318990.1677535186.CjwKCAiAxvGfBhB-EiwAMPakqg3oheQzEdXy65DqWGRGVy0MpGXgonhy7B7IUhsdxBX2xZrVzqhEcxoCJtgQAvD_BwE#resource-owner-password-grant), is vague in attempting to retrieve a token WITHOUT the login flow.

This is admittedly a bit of a tricky topic - I believe the following posts may prove helpful:

> [@Associate MFA factor from own UI: error on factor activation](https://community.auth0.com/t/associate-mfa-factor-from-own-ui-error-on-factor-activation/44384/10):
>
> Hey @thijmen96 It’s admittedly confusing, but the “MFA token” can be obtained in two ways: what’s returned as the mfa token along with the mfa\_required error in the resource owner password grant flow the access token you obtain with regular /authorize request, with an audience=https://YOUR\_AUTH0\_DOMAIN/mfa/ and scopes enroll read:authenticators delete:authenticators So, essentially, the same token used for enrollment is used to confirm the authenticator. If you are using custom domains the…

> [@Custom UI to challenge MFA post login](https://community.auth0.com/t/custom-ui-to-challenge-mfa-post-login/76505/2):
>
> Response from Auth0 support ticket: The approach shown on [https://auth0.com/docs/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa/enroll-and-challenge-otp-authenticator](https://auth0.com/docs/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa/enroll-and-challenge-otp-authenticators), as you’ve already correctly understood, is for building your own UI. It will still use our Authentication pipeline as usual. " How would I generate this MFA\_TOKEN post login? I don’t want the user to re-enter their credentials again or re-confirm via SSO. " MFA only works as an extensibility endpoint d…

Basically, obtaining an MFA API token cannot be fully decoupled from the login flow.

Hope this helps to clarify!

---

<div class="post-metadata">

**Author:** ![benjamin\_mumma](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/benjamin_mumma/32/33412_2.png) [@benjamin\_mumma](https://community.auth0.com/u/benjamin_mumma)\
**Post date:** [February 28, 2023, 2:07pm UTC](https://community.auth0.com/t/how-to-get-mfa-api-access-tokens/101409/4 "2023-02-28T14:07:59Z")

</div>

Thanks tyf. I’ll take a look at the links you sent over

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 29, 2023, 12:03am UTC](https://community.auth0.com/t/how-to-get-mfa-api-access-tokens/101409/5 "2023-04-29T00:03:37Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
