Skip to content

uploadGJLevel21.php ​

Uploads a created level to the servers.

Parameters ​

ParameterExplanation
gameVersion *A number representing the game's version. The current value is 22 for 2.2
accountID *The player's account ID (not to be confused with user ID). Used for authorization
gjp2 *The player's account password, encoded with GJP2. Used for authorization
userName *The uploader's username
levelID *The ID of the level if updating to a newer version, otherwise 0
levelName *The name of the level
levelDesc *The description of the level, in URL-safe base64
levelVersion *The version number of the level
levelLength *The length of the level as a number, where 0 is Tiny, 4 is XL and 5 is Platformer
audioTrack *The official song number used in the level (Stereo Madness = 0). Set to 0 if a newgrounds song is used
auto *Whether the player has jumped during verification
password aThe 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=39
original *The ID of the original level if the level was copied, otherwise 0
twoPlayer *Set to 1 if the level utilizes two player mode
songID *The ID of the custom song used in the level. Set to 0 if an official song is used
objects *The number of objects in the level
coins *The number of user coins in the level
requestedStars *The requested star rating for the level. The number is not limited to 10
unlisted aSet to 2 if the level should be unlisted, 1 if it should be unlisted and only viewable by friends, 0 if it should be listed
ldm *Whether the level uses high detail objects
levelString *The actual level data. Must be gzip compressed and then converted to URL-safe base64
seed2 *See the upload level chk
secret *Common Secret: Wmfd2893gb7
wt aThe amount of time spent in the editor of a level (local copy)
wt2 aThe amount of time spent in the editor of a level (previous copies)
seed aA random string
extraString cCapacity String
Sent when: value is not empty
levelInfopre-2.208 lrs
binaryVersion aA number representing the game's small version. The current value is 51 for 2.209 on PC and mobile
ts aThe amount of 240 TPS steps the verification attempt took
lrs aThe replay string of the verification attempt, for leaderboard moderators
notify aWhich users to notify about the upload: 0 - none, 1 - friends, 2 - followers, 3 - friends and followers
ct aThe current Unix timestamp in seconds
bs aThe Build Stats String
songIDs cThe level's song ID list, as stored in client key k104
Sent when: not empty
sfxIDs cThe level's SFX ID list, as stored in client key k105
Sent when: not empty
udid aThe player's UDID (Unique Device Identifier). Used to identify unregistered users
uuid aThe player's user ID. See the previous format here
dvs aA number representing the OS platform 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