wp-net / WordPressPCL

This is a portable library for consuimg the WordPress REST-API in (almost) any C# application
MIT License
338 stars 129 forks source link

Cannot GetByID() on a private post #192

Closed dapug closed 3 years ago

dapug commented 4 years ago

GetPost by ID works fine for published posts (authenticated or not), BUT if the post is not published, I get a 401.

await client.Posts.GetByID(postID);

I have a valid auth token, as IsValidJWToken() returns true after signing in and getting the token. var isValidToken = await client.IsValidJWToken();

The user is an admin, it's not a permissions issue in WP.

ThomasPe commented 4 years ago

sorry for the late reply. Have you tried if you can get the post directly through the REST API?

ThomasPe commented 3 years ago

I’m closing this issue because it has been inactive for a while. Please feel free to reopen if you still encounter this issue. Thanks!