• Resolved rafaelmpweb

    (@rafaelmpweb)


    Hi! I am using JSON Feed Reader in Android.
    The ‘get_recent_posts’ and ‘get_posts’ method work perfectly , but ‘create_post’ , ‘update_post’ and ‘delete_post’ not work .

    error >

    {“status”:”error”,”error”:”You must include a ‘nonce’ value to create posts. Use the get_nonce Core API method.”}

    I think there must be some setting that I do not know . Can you help me ? Thank you !

    https://www.ads-software.com/plugins/json-api-auth/

Viewing 1 replies (of 1 total)
  • Plugin Author Ali Qureshi

    (@parorrey)

    Firstly, they are part of JSON API plugin not JSON API Auth. You are in the wrong forums.

    Secondly, you can get_nonce value, just click on the link of this method on JSON API plugin page, and provide the controller (posts) and method name (create_post or update_post or delete_post). You have to activate the Posts controller too. it is disabled by default.

    https://localhost/api/get_nonce/?controller=posts&method=create_post

    if activated, you should get a response like this:

    {"status":"ok","controller":"posts","method":"create_post","nonce":"b447520730"}

    Now take this nonce value and use it to create post.

    Thirdly, it might still not resolve what you are trying to do. i.e. you can’t create/update/delete post without user authentication via REST. it will work though if you will try it within browser session and you are logged in as admin user.

    Lastly, try my other plugin ‘JSON API User’. it includes all the function of this plugin ‘JSON API Auth’ and some more..
    I’m going to release a pro version shortly which will allow you to add/edit/delete post or page via REST that you are trying to do.

    Hope that helps.

Viewing 1 replies (of 1 total)
  • The topic ‘JSON AP Method not work’ is closed to new replies.