Search code examples
wordpresswordpress-rest-api

Create WordPress users from API


I am trying to create a WordPress user using an API. I have done Basic Auth in Postman and I am using form-data method with username, email and password keys with their corresponding values and of course, a POST request. The URL is structured like this:website/wp-json/wp/v2/users This is what's returned: { "status": "ok", "json_api_version": "2.3.0", "controllers": [ "users", "core" ]

When I check the website though, the user is not created. I'm a newbie and would appreciate any help. Thank you.


Solution

  • Fixed! The issue was created by the JSON API, so I created an authentication password using the WP native method: https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/