I tried searching for an issue similar to mine but nothing came up.
I’m trying to use the GF V2 REST API but something came up while I was exploring it.
This is going to be used in a headless WordPress project, where the frontend will be built using a React framework (Frontity). I want to use Gravity Forms as my forms solutions so I need to use its API.
My plan is to just make a form in React and then onSubmit make the form send the POST request to the form entry endpoint, however, in order to do that, I have to use authentication. And since I’m going to do this with JavaScript, the authentication will be client-side.
I’m trying to figure out a way of hiding the client-side Consumer Key and Consumer Secret. My main concern is that with the credentials that have write permissions (the ones I have to use to submit the entries) someone can use those same credentials do delete entries.
Am I missing something? Any best practices that I should be aware of?
This response is not about authentication; it’s about missing a required field. Ensure that all the required data is being submitted, or try making the field (not required) and test again (without authentication.) Thank you.
Well, I tried that already.
If I make the fields not required then I get an error message stating that one of the fields must be filled.
Just for reference, here is the body of my request:
That is a different sort of error. You must submit a value in one of the fields, that is true. Why are you not sending any values, whether or not the fields are required?