1. Home
  2. WP User
  3. REST API
  4. Login User

Login User

EndPoint

Endpoint : wp-json/wpuser/v1/user/login

Method : POST

Users are accessible through the WordPress REST API at the  /wpuser/ endpoint.

To list user, send a POST request to the wp-json/wpuser/v1/user/login endpoint

Example Request 

http://localhost/wpuserplus/wp-json/wpuser/v1/user/login

Arguments

wp_user_email_name *Login name for the user.Email / Username / Mobile numberRequired
wp_user_password *Password for the user.Required

* indicate Required fields.

Validates the user credentials, wp_user_email_name and wp_user_password, and returns a token to use in a future request to the API if the authentication is correct or error if the authentication fails.

User first sign/login using login API  (using. username and password,).

The login API  creates the JWT and sends it to the user.

When the user makes API calls to the application, the user passes the JWT along with the API call in header (header name – authorization).

When the user makes API calls with the attached JWT, the application can use the JWT to verify that the API call is coming from an authenticated user.

Was this article helpful to you? Yes No