Error: You need to login with a user that has 'edit_posts' capacity.
-
Hi, thanks for this plugin!
I have no trouble generating the cookie and getting the user info, but I can’t seem to create a post through the api/create_post/ method. It keeps giving me the error: You need to login with a user that has ‘edit_posts’ capacity.
The user/pass I’m using is an admin user with the proper capabilities.
Here’s my code:
// already got the nonce and cookie, use it to create post
$.ajax({
type: ‘POST’,
url: ‘https://mysite.com/api/create_post/’,
data: { cookie: app.authCookie, nonce: app.nonce, title: $(‘#post_title’).val(), content: $(‘#post_content’).val(), status: ‘publish’ },
success: function(data) {
console.log(data);
}
});I’d really appreciate some help, thanks!
- The topic ‘Error: You need to login with a user that has 'edit_posts' capacity.’ is closed to new replies.