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

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"}
| improve this answer | |
  • how to create nonce for custom post, say add new book ? I have used ACF and CPT UI to create custom post type 'book' – Riz Apr 1 at 6:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.