Skip to content

uploadGJLevel21.php

Uploads a created level to the servers.

Parameters

ParameterExplanationRequired
gameVersionA number representing the game's version. The current value is 22 for 2.2Yes
accountIDThe player's account ID (not to be confused with user ID). Used for authorizationYes
gjp2The player's account password, encoded with GJP2. Used for authorizationYes
userNameThe uploader's usernameYes
levelIDThe ID of the level if updating to a newer version, otherwise 0Yes
levelNameThe name of the levelYes
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
autoWhether the player has jumped during verificationYes
passwordThe level's copy password. Set to 0 for no copy or 1 for free copy. Other valid values consist of 1 followed by the password - either 4 or 6 digits. Ignored since binaryVersion=39Yes
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 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 unlisted and only viewable by friendsYes
ldmWhether the level uses high detail objectsYes
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
extraStringhttps://boomlings.dev/resources/client/level-components/capacity-string#capacity-string
levelInfopre-2.208 lrs
binaryVersionA number representing the game's small version. The current value is 47 for 2.2081 on PC and 48 for 2.208 on mobile
tsThe amount of 240 TPS steps the verification attempt took
lrsThe replay string of the verification attempt, for leaderboard mods. TODO: document format
udidThe player's UDID (Unique Device Identifier). Used to identify unregistered users
uuidIn modern versions, this is sent as the user ID. See the previous format here
dvsA number added in 2.208 representing the device the player is using. Corresponds to the Cocos2d CC_TARGET_PLATFORM macro: 1 for iOS, 2 for Android, 3 for Windows, 8 for macOS

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