WP REST User

If you wish to 'Register User' using REST API, without exposing Administrator credentials to the Front End application, you are at the right …

Author:SK8Tech (profile at wordpress.org)
WordPress version required:4.7.0
WordPress version tested:5.5.3
Plugin version:1.4.3
Added to WordPress repository:30-04-2018
Last updated:19-08-2020
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:80
Rated by:4
Plugin URI:https://sk8.tech?utm_source=wp-admin&utm_medi...
Total downloads:12 108
Active installs:2 000+
plugin download
Click to start download

If you wish to ‘Register User’ or ‘Retrieve Password’ using REST API, without exposing Administrator credentials to the Front End application, you are at the right place. Since WordPress 4.7, REST API was natively included in WordPress.

In order to ‘Register User’ or ‘Retrieve Password’, the authentication for a user with ‘Administrator’ role is required. While this is a delibrately done for security reasons, such implementation makes it very hard for Front End applications to implement a simple ‘Register’ or ‘Sign Up’ function.

This plugin fullfills such requirement by extending the existing WordPress REST API endpoints.

Usage

Register a User

To Register a User using REST API, send a POST request to /wp-json/wp/v2/users/register, with a JSON body (Set header: content-type: application/json):

{
    "username": "your-username",
    "email": "username@test.com",
    "password": "0000",
}

If successful, you should receive the following response

{
    "code": 200,
    "id": 13,
    "message": "User 'your-username' Registration was Successful"
}

To perform further actions after user is registered, write and add_action:

add_action('wp_rest_user_user_register', 'user_registered');
function user_registered($user) {
    // Do Something
}

Reset Password

To Retrieve Password using REST API, send a POST request to “/wp-json/wp/v2/users/lost-password`, including a JSON body (Set header: content-type: application/json):

{
    "user_login": "username@test.com"
}


user_login can be either user's username or email.

If successful, you should receive the following response

{
    "code": 200,
    "message": "Reset Password link has been sent to your email."
}

See the Screenshot below for POSTMAN demo:

Technical Support

SK8Tech – Customer Success Specialist offers Technical Support to configure or install WP REST User.

Our Services

Contact Us

Based in Sydney, SK8Tech is a innovative company providing IT services to SMEs, including Web Design, App Development and more.