cancel
Showing results for 
Search instead for 
Did you mean: 

disable two factor authentication only for API

disable two factor authentication only for API

Hi, 
I m starting a new project . 
We will have a lot of automatic connection by API for one of our own server in python by cron jobs request so with a really secure gate. 
But we will have also connections by the admin 
Automatic connection by API can t use the two factor authentication isn t it?

So is it possible to disable this two factor authentication for the API only.
But we want to use the two factor on the admin accessible possibly by all the world.
Thanks a lot 
Thomas

4 REPLIES 4

Re: disable two factor authentication only for API

Hello @thomas34 


Please try below steps :

To disable 2FA for API Token Generation,

1. visit Admin > Stores > Settings > Configuration > Security > 2FA

2. and set Enable 2FA for API Token Generation to No

 

It may help you.
Thank you.

Problem solved? Click Accept as Solution!

Re: disable two factor authentication only for API

Hello  @thomas34 

 

Please try below steps :
To disable 2FA for API Token Generation,

1. visit Admin > Stores > Settings > Configuration > Security > 2FA

2. and set Enable 2FA for API Token Generation to No 

 

If you disable this extension from command line.

please run below command in terminal Magento root path :

bin/magento module:disable Magento_TwoFactorAuth bin/magento cache:flush 

 

------------------------------------------------
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"


@thomas34 wrote:

Hi, 
I m starting a new project . 
We will have a lot of automatic connection by API for one of our own server in python by cron jobs request so with a really secure gate. 
But we will have also connections by the admin 
Automatic connection by API can t use the two factor authentication isn t it?

So is it possible to disable this two factor authentication for the API only.
But we want to use the two factor on the admin accessible possibly by all the world.
Thanks a lot 
Thomas


 

Re: disable two factor authentication only for API

Hi , 

 

On our Magento configuration, this option is missing. where can I find this option? 

 

Re: disable two factor authentication only for API

I think that previous answer was trying point this module https://github.com/markshust/magento2-module-disabletwofactorauth