At 2/24/23 09:00 PM, bodziozet wrote:
Hi. I wanted to get a feel on how newgrounds.io api works but in reality i cannot even made the simplest of calls myself . Im using postman. Im using this adress https://www.newgrounds.io/gateway_v3.php . Im selecting method POST and then in the body section im clicking raw and then selecting JSON. then I already tried to send this 3 JSON objects:
1.
{
Ok. So at least i think i know what is happening in this situation. All these API calls do not work because newgrounds.api expect you to send something more than a JSON string. It wants a key : value pair where key is either request or input and the value is a JSON string. It's like you would submit a form to the gateway it would send a key : value pair where the key is the name of the textarea in which you wrote the JSON String.
At 2/24/23 09:00 PM, bodziozet wrote:
Hi. I wanted to get a feel on how newgrounds.io api works but in reality i cannot even made the simplest of calls myself . Im using postman. Im using this adress https://www.newgrounds.io/gateway_v3.php . Im selecting method POST and then in the body section im clicking raw and then selecting JSON. then I already tried to send this 3 JSON objects:
1.
{
Ok. So at least i think i know what is happening in this situation. All these API calls do not work because newgrounds.api expect you to send something more than a JSON string. It wants a key : value pair where key is either request or input and the value is a JSON string. It's like you would submit a form to the gateway it would send a key : value pair where the key is the name of the textarea in which you wrote the JSON String. So if somebody wants to test the api with postman you have to send the JSON not as raw JSON butas form-data and then you add new key value pair where key is request and value is your JSON string.