00:00
00:00
Newgrounds Background Image Theme

Burning78Omen34 just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

Newgrounds.io Help & Support

43,473 Views | 136 Replies
New Topic Respond to this Topic

Response to Newgrounds.io Help & Support 2022-06-14 16:16:27


Wick tells me that I can't open the widgets at all. Any fix?


suspect

Professional Guy

BBS Signature

Response to Newgrounds.io Help & Support 2022-06-15 17:50:23


At 6/14/22 04:16 PM, suspct wrote: Wick tells me that I can't open the widgets at all. Any fix?


Wick Editor? Have you tried this guide to set up Newgrounds.io? Or could you describe where you're stuck?

I just tried to plug it in a test project I had lying around, followed it step-by-step and it seems like it still does work.


iu_667943_4428769.gif


I was able to get the user session and unlock a medal in the preview (here's the source wick file).

Response to Newgrounds.io Help & Support 2022-07-20 20:55:55


Will GameMaker Studio 2 get Ads like the Flash API? Just seeing like it would be a great feature to add to it so content creators can make some advertisement money on the side.

Response to Newgrounds.io Help & Support 2022-07-21 13:34:59


At 7/20/22 08:55 PM, mastorkey wrote: Will GameMaker Studio 2 get Ads like the Flash API? Just seeing like it would be a great feature to add to it so content creators can make some advertisement money on the side.


The advertising stuff is all deprecated and won't be coming back. Frankly, there's just no value in it anymore.

Response to Newgrounds.io Help & Support 2022-08-05 16:32:02


iu_717831_11275761.webp

Bro why I can't play any song please help


I'm testing out cloud save support in my Godot implementation for the API and it seems like if the data string has embedded quotes it ends up not working, even if I try to add backslashes in front to escape them. It looks like it works if there are no quotes, but that puts a damper on saving complex data as a JSON encoded string.


I could workaround by having my API implementation replace quotes with some other string of characters that would be unlikely to ever be used by any dev whenever it sends or receives data, but first wanted to check whether strings with embedded quotes are known to work? If they do and I'm just overlooking something (maybe an issue with how my script is handling things before it sends the API request) I'll spend more time trying to fix the underlying problem if possible before resorting to a kludgey workaround.


My newsfeed has random GameDev tips & tricks

Response to Newgrounds.io Help & Support 2022-08-09 13:10:53


At 8/7/22 06:50 PM, 3p0ch wrote: I'm testing out cloud save support in my Godot implementation for the API and it seems like if the data string has embedded quotes it ends up not working, even if I try to add backslashes in front to escape them. It looks like it works if there are no quotes, but that puts a damper on saving complex data as a JSON encoded string.

I could workaround by having my API implementation replace quotes with some other string of characters that would be unlikely to ever be used by any dev whenever it sends or receives data, but first wanted to check whether strings with embedded quotes are known to work? If they do and I'm just overlooking something (maybe an issue with how my script is handling things before it sends the API request) I'll spend more time trying to fix the underlying problem if possible before resorting to a kludgey workaround.


I'm not sure how you're encoding the JSON in your implementation, but you should be escaping things like quotes and slashes when encoding string data.


So if your "data" value in the cloud save was a JSON string like:

{"characterName": "Drip Tinkler", "level": 12}


When you encode that in the larger JSON object it would look like:

"{\"characterName\": \"Drip Tinkler\", \"level\": 12}"

@PsychoGoldfish


Someone else named planktonfun made a Newgrounds API extension for GDevelop, it should probably added to newgrounds.io along the other implementation.


https://gdevelop.io/game-example/newgrounds-api

https://wiki.gdevelop.io/gdevelop5/extensions/newgrounds-api/reference


Ok boomer.

BBS Signature

Response to Newgrounds.io Help & Support 2023-02-24 21:00:40


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.

{

    "app_id": "test",

    "debug": true,

    "execute": {

        "component": "Gateway.getDatetime",

        "parameters": {},

        "echo": "Hello World!"

    }

}

2.

{


     "app_id": 'test',


     "session_id": null,


     "call": {


          "component": "Gateway.getVersion"


     }


}

3.

{


     "app_id": "test",


     "session_id": null,


     "call": {


          "component": "Gateway.getVersion"


     }


}

In all 3 cases im getting the same response :


{

    "success": false,

    "error": {

        "message": "Missing required request",

        "code": 100

    },

    "api_version": "3.0.0",

    "help_url": "http://www.newgrounds.com/wiki/creator-resources/newgrounds-apis/newgrounds-io"

}


What em i doing wrong? Please help.

Response to Newgrounds.io Help & Support 2023-02-25 09:40:45


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.

I suspect it's something to do with how the post is structured by Postman, but you probably don't need to use Postman in the first place. What engine / framework are you making your game in? There are probably already implementations at https://www.newgrounds.io/get-started/#step-4-learn-how-to-use-the-api-components for whatever you're using, and even if you're making something from scratch there should be easier ways of doing it than having to use something like Postman, so it probably wouldn't be worth worrying about details of how to make Postman do what you want if that's not ultimately what would make sense to use in a game.


My newsfeed has random GameDev tips & tricks

Response to Newgrounds.io Help & Support 2023-02-25 10:30:34


At 2/25/23 09:40 AM, 3p0ch wrote:
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.
I suspect it's something to do with how the post is structured by Postman, but you probably don't need to use Postman in the first place. What engine / framework are you making your game in? There are probably already implementations at https://www.newgrounds.io/get-started/#step-4-learn-how-to-use-the-api-components for whatever you're using, and even if you're making something from scratch there should be easier ways of doing it than having to use something like Postman, so it probably wouldn't be worth worrying about details of how to make Postman do what you want if that's not ultimately what would make sense to use in a game.

Hi thanks for your reply. I'm making my game in GameMaker2 and i already have a library of functions imported but i don't like how i cannot find documentation on how are these functions working and what are they returning so i tried to get a feel on how the api works and i cannot even make the call using postman or even i tried do the same in some online site that works like postman and i could not get success response. Using Game maker 2 functions i was unable to do what i wanted to do. I dont even understand if ng_connect function really connects to the server or only instantiate an object with app id and encryption keys that other functions will use.

Response to Newgrounds.io Help & Support 2023-03-02 20:29:09


Hi i have a question about newgounds.io functions inside Game Maker 2 Studio. How to use ng_getScores() function? Under the hood the function seems to be asynchronous so the var score = ng_getScores(app_id, board_id) does not work properly or maybe i'm missing something?


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.

Response to Newgrounds.io Help & Support 2023-03-04 10:57:05


At 3/4/23 10:28 AM, bodziozet wrote:
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.
{
    "app_id": "test",
    "debug": true,
    "execute": {
        "component": "Gateway.getDatetime",
        "parameters": {},
        "echo": "Hello World!"
    }
}
2.
3.
In all 3 cases im getting the same response :

{
    "success": false,
    "error": {
        "message": "Missing required request",
        "code": 100
    },
    "api_version": "3.0.0",
    "help_url": "http://www.newgrounds.com/wiki/creator-resources/newgrounds-apis/newgrounds-io"
}

What em i doing wrong? Please help.
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.


Furthermore if you want to make an api call for example using native Game Maker Studio 2 functions other than the newgrounds.api extension for example http_post_string you do not post only json string but to the json string you append at the begining something like "request=".


At 3/4/23 10:57 AM, bodziozet wrote:
At 3/4/23 10:28 AM, bodziozet wrote:
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.
{
    "app_id": "test",
    "debug": true,
    "execute": {
        "component": "Gateway.getDatetime",
        "parameters": {},
        "echo": "Hello World!"
    }
}
2.
3.
In all 3 cases im getting the same response :

{
    "success": false,
    "error": {
        "message": "Missing required request",
        "code": 100
    },
    "api_version": "3.0.0",
    "help_url": "http://www.newgrounds.com/wiki/creator-resources/newgrounds-apis/newgrounds-io"
}

What em i doing wrong? Please help.
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.
Furthermore if you want to make an api call for example using native Game Maker Studio 2 functions other than the newgrounds.api extension for example http_post_string you do not post only json string but to the json string you append at the begining something like "request=".


Im sory for posting another reply to myself but i cannot edit the reply before. So I want to use a native Game maker Studio 2 function like http_post_string() because i do not understand how the newgorunds.api extension function for Game maker Studio 2 called ng_getScores supposed to work. When im looking at the source code the implementation looks like that:

function ng_getScores(board_app_id, board_id, board_limit, board_period, board_skip, board_social, board_tag, user_id_or_name) {
	if (!ngio.user) return "";


	for (var i = 0; i < scoreboards.length; i++) {
		scoreboard = scoreboards[i];
		if (board_id == scoreboard.id || board_id == scoreboard.name) {
			thescoreboard = ngio.callComponent('ScoreBoard.getScores', { app_id: board_app_id, id: scoreboard.id, limit: board_limit, period: board_period, skip: board_skip, social: board_social, tag: board_tag, user: user_id_or_name });
			return thescoreboard;
		}
	}
}


So the function returns thescoreboard so it probably should be used like that var thescoreboard = ng_getScores(parameters). But this function under the hood uses ngio.callComponent() which looks like an asynchronous call. So this not supposed to work. When im using native function like http_post_string then when the function returns then an Asynchronous Http event will be triggerd in which i can handle the response.

Response to Newgrounds.io Help & Support 2023-06-24 18:15:57


Is something up with NGIO right now? I'm getting cors policy error both in my editor previews and when I export to newgrounds


Access to XMLHttpRequest at 'https://newgrounds.io/gateway_v3.php' from origin 'https://isolated.ungrounded.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.


I'm also getting 429 errors (too many requests?) but I've never had an issue before today.


BBS Signature

Response to Newgrounds.io Help & Support 2023-09-30 11:25:48


iu_1089397_11545318.png

Getting this error in the browser console after building the game. Im using NGIO for Unity and it all works perfectly in the Unity Editor, so I'm not sure what to do