Sorry, you are not allowed to create posts as this user
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?
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!
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?
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