Title: Creating Users via REST API
Last modified: November 18, 2022

---

# Creating Users via REST API

 *  Resolved [bohdanwlcm](https://wordpress.org/support/users/bohdanwlcm/)
 * (@bohdanwlcm)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/creating-users-via-rest-api/)
 * Hey community,
    I’m trying to make it possible to create users via REST API using
   Basic auth. But I’m getting this error:
 *     ```
       {
           "code": "rest_cannot_create_user",
           "message": "Sorry, you are not allowed to create new users.",
           "data": {
               "status": 401
           }
       }
       ```
   
 * My account has the Admin role.
    What should I do to make it possible to add users
   via REST API?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/creating-users-via-rest-api/#post-16212497)
 * You need a [proper authentication](https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/)
   to be able to update the DB. Unless you’re using the default cookie auth, your
   WP role is not a factor. Useful auth plugins are listed near the bottom of the
   linked page, including Basic Auth.
 * Application Passwords is another alternative, it’s no longer a plugin, it had
   been incorporated into WP core. Despite what I said earlier, it’s indirectly 
   related to your WP role, or rather the role that created the password. FWIW, 
   this is my go-to choice for authorization.
 *  Thread Starter [bohdanwlcm](https://wordpress.org/support/users/bohdanwlcm/)
 * (@bohdanwlcm)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/creating-users-via-rest-api/#post-16262504)
 * Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Creating Users via REST API’ is closed to new replies.

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)
 * [rest](https://wordpress.org/support/topic-tag/rest/)
 * [users](https://wordpress.org/support/topic-tag/users/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 2 participants
 * Last reply from: [bohdanwlcm](https://wordpress.org/support/users/bohdanwlcm/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/creating-users-via-rest-api/#post-16262504)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
