Closed SocialNetUsr closed 5 years ago
Yes, you need to have valid JWT token for an authorized user to get unpublished posts.
i'm using the below command which returns true. What else can i check ??
await client.IsValidJWToken();
that should technically do it. Are you using a user that has the correct permissions to access unpublished posts?
my user has Administrator role i have try almost all available methods without luck
Also in wp-admin/edit.php i can see the unpublished posts
@SocialNetUsr try
var post = await client.Posts.GetByID(9999, useAuth: true);
bloody great, it's working!!! I didn't check this constructor.... Thanks all for the help!!!
Hi to all,
I'm trying to publish an unpublished post but the GetByID returns "Sorry, you are not allowed to do that." After some investigation i founded that the plugin cannot get posts that are in unpublished status. Any ideas??
var post = await client.Posts.GetByID(9999);
post.Status = Status.Publish;
post.Date = DateTime.Now;
var updatedPost = await client.Posts.Update(post);