Comments (4)
Hi
A few question, firstly is there any reason why you are using an older version of the API, I see the latest stabilized version is 4.11.1?
Can you confirm that you wordpress installation is accessible through the rest API by doing a curl command with edit context similar to this:
curl --user 'customUser:customPassword' "https://www.example.com/wp-json/wp/v2/posts?context=edit"
Regards,
Clinton
from wp-api-v2-client-java.
Hi
So seems to ekude to the fact that your user has not been correctly set up. Can you confirm that your username and password are correct, also the user will have to be an author at least.
I see we have not pushed to mvn resontly, I will try and do this next week, but in the meantime you can fork the repo from github if you want and build it yourself
Regards,
Clinton
from wp-api-v2-client-java.
Hello!
Thank you for responding.
First of all, let me thank you for this wonderful library.
I took the latest version available on mvnrepository 4.8.3 -
https://mvnrepository.com/artifact/com.afrozaar.wordpress/wp-api-v2-client-java
Where I can get the newest version?
Thanks in advance!
Best Regards, Orkhan.
P.S. Also I see an error when executing a cURL command related to WordPress. May be I need to update htaccess file. I will check it too.
{"code":"rest_forbidden_context","message":"Sorry, you are not allowed to edit posts in this post type.","data":{"status":401}}
from wp-api-v2-client-java.
Hi,
per my check I have an admin access to the Wordpress site and can access to the dashboard with login and password credentials.
I have installed this plugin https://github.com/WP-API/Basic-Auth and checked one more time. And in this case it works.
In moment I use 4.8.3 version and will update later from mvnrepository.
Thank you so much for your support!
P.S. a small mistake (customUser:customPassword without brackets)
curl --user customUser:customPassword "https://www.example.com/wp-json/wp/v2/posts?context=edit"
from wp-api-v2-client-java.
Related Issues (20)
- Add support for using a custom base context
- Creating media using ByteArrayResource causes HTTP/400 response. HOT 1
- Allow specifying request context (view | edit | embed) when requesting Media HOT 4
- 401 : rest_cannot_create HOT 1
- Can this be used to add podcast episodes to PowerPress? HOT 6
- Searching for posts by status draft
- Any existed api for wpClient.getAllPosts()? HOT 2
- Any existed api for wpClient.getAllPostsByAuthorNameOrId()?
- Implementing post meta crud HOT 1
- Is the project still maintained? HOT 5
- Some questions about WP API V2 Client
- getPost(id, "embed") does not work
- Latest version (4.14) on start ends with exception HOT 4
- Error: No content to map due to end-of-input HOT 4
- While Creating / Updating post "slug" value gets ignored. HOT 1
- 401 unauthorized error HOT 2
- UTF8 characters - Latin Diacritics are not rendering properly HOT 1
- RestClientException when trying to create a post HOT 2
- Maven repositories are password protected HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wp-api-v2-client-java.