Coder Social home page Coder Social logo

Comments (4)

clintonbosch avatar clintonbosch commented on June 15, 2024 1

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.

clintonbosch avatar clintonbosch commented on June 15, 2024 1

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.

hasanli-orkhan avatar hasanli-orkhan commented on June 15, 2024

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.

hasanli-orkhan avatar hasanli-orkhan commented on June 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.