Endpoint : wp-json/wpuser/v1/token/generate
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/token/generate endpoint
Example Request Example Request
|wp_user_email_name *||Login name for the user.
Email / Username / Mobile number
Password for the user.
* 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.