node-wpapi icon indicating copy to clipboard operation
node-wpapi copied to clipboard

Sorry, you are not allowed to create posts as this user

Open jonaslund opened this issue 5 years ago • 5 comments

The famous authentication issue {code: "rest_cannot_create", message: "Sorry, you are not allowed to create posts as this user.", data: {…}}

There's no viable solutions or documentation and I've tested both the Basic Auth and the Application Passwords plugin but nothing seem to work.

Any solution for nginx?

jonaslund avatar Aug 26 '20 15:08 jonaslund

I had a similar problem for using the wp-json REST API to upload images.

I didn't do anything different for Nginx.

I installed the "Application Passwords" plugin. I went to my user in WordPress. Down near the bottom, it says "Application Passwords" and I created a new one called "REST API", and then copied that back to the script that I'm using and it worked.

The combination that worked was the regular username (Travis) and the password created by the "Application Passwords" tool. For my Nginx configuration I just used this:

https://www.nginx.com/resources/wiki/start/topics/recipes/wordpress/

Hope this helps!

travis-st avatar Jan 30 '21 17:01 travis-st

I am experiencing the same issue with Nginx setup. I am using Basic Auth and Application Passwords and this has not helped (I am using the correct combination of account username and not password name).

Are there any other potential solutions?

garryreeve avatar Feb 08 '21 11:02 garryreeve

I had a similar problem for using the wp-json REST API to upload images.

I didn't do anything different for Nginx.

I installed the "Application Passwords" plugin. I went to my user in WordPress. Down near the bottom, it says "Application Passwords" and I created a new one called "REST API", and then copied that back to the script that I'm using and it worked.

The combination that worked was the regular username (Travis) and the password created by the "Application Passwords" tool. For my Nginx configuration I just used this:

https://www.nginx.com/resources/wiki/start/topics/recipes/wordpress/

Hope this helps!

Thanks a lot @travis-st it works for me

AleAntonellis avatar Mar 16 '21 21:03 AleAntonellis