2

I try to open this url in my browser or calling from my frontend application: http://78.47.177.214/blog/api/get_nonce/?controller=posts&method=create_post i keep getting the response

{"status":"error","error":"Include 'controller' and 'method' vars in your request."}

what is wrong, I want to be able to create a custom post type with custom fields in the end but using json api I need nonce first

1 Answer 1

4

You need to call like below.

API call:-

http://78.47.177.214/blog/api/get_nonce/?json=get_nonce&controller=posts&method=create_post

Responce:-

{"status":"ok","controller":"posts","method":"create_post","nonce":"92f31d49b5"}
1
  • how to create nonce for custom post, say add new book ? I have used ACF and CPT UI to create custom post type 'book' Commented Apr 1, 2020 at 6:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.