How to properly structure JSON
-
First off, thanks for this plugin!
The issue I’m having is I can’t structure the JSON data to send a proper call to my API.
I have tried using the POST form and including my API key as a hidden field and it worked perfectly. I did this only for testing purposes, however, as I do not wish to expose my API key on the front-end. So I’m now trying to send a request using custom JSON for the data.
I can’t seem to structure this in a way that will pass the parameters to the API. Specifically the API returns a message of “No API Key specified.” which tells me the data is not getting there.
My JSON looks like this:
{ "apikey":"PLACEHOLDER_KEY", "name":"[your-name]", "email":"[your-email]", }
I have tried putting it all inside a “data” key, and a “body” key but I’m clearly doing something wrong, just trying to understand how to format this request properly. I would greatly appreciate any help!
- The topic ‘How to properly structure JSON’ is closed to new replies.