• Resolved alekmitch

    (@alekmitch)


    Hi,

    I’m having an issue with sending a POST request for this plugin to the endpoint? /wp-json/jwt-auth/v1/token for one of my sites because of this plugin.

    My two other sites are working but this one keeps giving me: 

        “code”: “[jwt_auth] invalid_application_credentials”,
        “message”: “Error: API login for user disabled.”,
        “data”: {
            “status”: 403

    I’ve done everything I can think of, including having my support at WPX go through the files twice to notice any difference between the sites, but couldn’t find anything. 

    Would you?mind providing some insight into what could be the issue here?

    I’m using JWT Authentication for WP-API plugin.

    • This topic was modified 1 year, 2 months ago by alekmitch.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter alekmitch

    (@alekmitch)

    Never mind, I created a custom plugin just for this issue.

    • This reply was modified 1 year, 2 months ago by alekmitch.
    Plugin Author Melapress

    (@melapress)

    Hello Alek,

    Glad to read the issue was solved. By the way, if you like the plugin, please do not forget to spare a minute to review the plugin and the support we provide. These reviews are really helpful.

    Just in case other people are looking for a solution, one can add this filter and it will do the trick:

    add_filter( 'two_factor_user_api_login_enable', function( $enable ) {
        // Allow API login when using an application password even with 2fa enabled.
        if ( did_action( 'application_password_did_authenticate' ) ) {
            return true;
        }
    
        return $enable;
    } );

    Thank you and have a great day.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘POST request failure (API issues)’ is closed to new replies.