Skip to content

uploadGJLevel21.php

Uploads a created level to the servers.

Parameters

ParameterExplanationRequired
gameVersionThe game version. Currently 22Yes
accountIDThe uploader's account IDYes
gjp2The uploader's GJP2Yes
userNameThe uploader's usernameYes
levelIDThe ID of the level if updating to a newer version, otherwise 0Yes
levelNameThe name of the level, in plain textYes
levelDescThe description of the level, in URL-safe base64Yes
levelVersionThe version number of the levelYes
levelLengthThe length of the level as a number, where 0 is tiny, 4 is XL and 5 is PlatformerYes
audioTrackThe official song number used in the level. Set to 0 if a newgrounds song is usedYes
autoUnknown (0)Yes
passwordThe level's copy password. Set to 0 for no copy or 1 for free copyYes
originalThe ID of the original level if the level was copied, otherwise 0Yes
twoPlayerSet to 1 if the level utilizes two player modeYes
songIDThe ID of the custom Newgrounds song used in the level. Set to 0 if an official song is usedYes
objectsThe number of objects in the levelYes
coinsThe number of user coins in the levelYes
requestedStarsThe requested star rating for the level. The number is not limited to 10Yes
unlistedSet to 2 if the level should be unlisted and to 1 if the level should be only viewable by friendsYes
ldmSet to 1 if the level should have a low detail checkboxYes
levelStringThe actual level data. Must be gzip compressed and then converted to URL-safe base64Yes
seed2A mandatory chk value generated from the first 50 characters of the compressed level dataYes
secretCommon Secret: Wmfd2893gb7Yes
wtThe amount of time spent in the editor of a level (local copy)
wt2The amount of time spent in the editor of a level (previous copies)
seedA random string
extraStringA list of underscore seperated numbers. apparently used for rendering levels
levelInfoA random gzip compressed string
binaryVersion42
gdw0

Response

Returns the ID of the uploaded level, or -1 if the request was rejected.

Example

Python

py
import requests

# This is an empty level with a default block at (8, 4)
# with (0, 0) being the bottom left block above the ground.

levelString = "H4sIAAAAAAAAC6WQwQ3DIAxFF3IlfxsIUU6ZIQP8AbJChy_GPSZqpF7-A4yfDOfhXcCiNMIqnVYrgYQl8rDwBTZCVbkQRI3oVHbiDU6F2jMF_lesl4q4kw2PJMbovxLBQxTpM3-I6q0oHmXjzx7N0240cu5w0UBNtESRkble8uSLHjh8nTubmYJZ2MvMrEITEN0gEJMxlLiMZ28frmj"

data = {
    "gameVersion": 21,
    "accountID": 173831, # This is DevExit's account ID
    "gjp2": "*******", # This would be DevExit's password encoded with GJP2 encryption
    "userName": "devexit",
    "levelID": 0,
    "levelName": "Test", # The level name is Test
    "levelDesc": "QSB0ZXN0IGxldmVsIGZvciB0aGUgR0QgRG9jcyE", # "A test level for the GD Docs!"
    "levelVersion": 1,
    "levelLength": 0,
    "audioTrack": 0, # This uses a newgrounds song
    "auto": 0,
    "password": 314159,
    "original": 55610687,
    "twoPlayer": 0,
    "songID": 546561, # NK - Jawbreaker
    "objects": 1,
    "coins": 0,
    "requestedStars": 50,
    "unlisted": 1, # This level is unlisted, but does exist!
    "ldm": 0,
    "levelString": levelString, # The level string for the level described above
    "seed2": generate_chk(key="41274", values=[generate_upload_seed(levelString)], salt="xI25fpAapCQg"), # This is talked about in the CHK encryption,
    "secret": "Wmfd2893gb7"
}

headers = {
	"User-Agent": ""
}

url = "https://www.boomlings.com/database/uploadGJLevel21.php"

req = requests.post(url=url, data=data, headers=headers)
print(req.text)

Response

plain
62687277