• I am unable to create a new user using the Rest API. It will always return the following error {“code”:”rest_cannot_create_user”,”message”:”Sorry, you are not allowed to create new users.”,”data”:{“status”:401}}
    It seems to happen with all POST calls. GET calls are fine.
    I am using an application password for authentication.

    In Postman the same POST command returns a 301 code and immediately does a GET, but my new user has not been created and does not appear in the response.

    I’ve tried updating the .htcaccess file with numerous modifications I found online and disabling all plug-ins and re-enabling but did not see any change in behavior.

    • This topic was modified 1 year, 5 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • Did you add this to your .htaccess file?

    RewriteEngine On
    RewriteCond %{HTTP:Authorization} ^(.*)
    RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
    • This reply was modified 1 year, 5 months ago by Saukia.
    Thread Starter jautomatic

    (@jautomatic)

    Yes I have tried adding those lines to my .htaccess file and am still seeing the same 401 error.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘401 Rest API error using application password’ is closed to new replies.