401 : Sorry, you are not allowed to create posts as this user
See original GitHub issueI have tried the same thing mentioned in it and I am getting below error message.
the account I am using is the Administrator and I have WP BASIC Auth (https://github.com/wokamoto/wp-basic-auth) plugin installed.
{
"data": {
"code": "rest_cannot_create",
"message": "Sorry, you are not allowed to create posts as this user.",
"data": {
"status": 401
}
},
"headers": {
"Allow": "GET"
},
"status": 401
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:13
Top Results From Across the Web
Creating a Post , via REST API: 401 Sorry, you are not allowed ...
The error message relates to creating taxonomy terms, not creating posts. It seems like you may be including new taxonomy term data with...
Read more >Sorry, you are not allowed to create posts as this user using ...
i have added the following code to htaccess and add plugin (JSON Basic Authentication) then it start working.
Read more >How to Fix "Sorry, You Are Not Allowed to Access This Page"
Restoring a backup in MyKinsta ; Disable all plugins by renaming the folder.
Read more >Getting 401 (access denied) when trying to use the REST API
It looks like it's accepting your credentials but failing a permission check for the post specifically. The check is here: github.com/WordPress/ ...
Read more >Error 401: Sorry You Are Not Allowed To Create Resources
This error will appear when a Scheduled Order fails to process. What This Error Means. This error means that the Wordpress Admin user...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I spent hours facing the same problem and finally got it to work. The only plugin I installed was Application Passwords. I also edited the .htaccess file per the comments above. The issue I ran into was what username to use for the authorization header. I was trying to use the name assigned to the password generated through Application Passwords. In reality, you should use your actual username, which in my case is just “admin” (along with the password from Application Passwords).
No amount of hacking the .htaccess file nor installing this plugin has the correct effect. Whenever I try to upload media with credentials that I know to be correct, I get “Sorry, you are not allowed to create posts as this user”. This makes absolutely no sense as the user is me and I’m an admin.