uploadGJLevel21.php
Uploads a created level to the servers.
Parameters
| Parameter | Explanation | Required |
|---|---|---|
gameVersion | The game version. Currently 22 | Yes |
accountID | The uploader's account ID | Yes |
gjp2 | The uploader's GJP2 | Yes |
userName | The uploader's username | Yes |
levelID | The ID of the level if updating to a newer version, otherwise 0 | Yes |
levelName | The name of the level, in plain text | Yes |
levelDesc | The description of the level, in URL-safe base64 | Yes |
levelVersion | The version number of the level | Yes |
levelLength | The length of the level as a number, where 0 is tiny, 4 is XL and 5 is Platformer | Yes |
audioTrack | The official song number used in the level. Set to 0 if a newgrounds song is used | Yes |
auto | Unknown (0) | Yes |
password | The level's copy password. Set to 0 for no copy or 1 for free copy | Yes |
original | The ID of the original level if the level was copied, otherwise 0 | Yes |
twoPlayer | Set to 1 if the level utilizes two player mode | Yes |
songID | The ID of the custom Newgrounds song used in the level. Set to 0 if an official song is used | Yes |
objects | The number of objects in the level | Yes |
coins | The number of user coins in the level | Yes |
requestedStars | The requested star rating for the level. The number is not limited to 10 | Yes |
unlisted | Set to 2 if the level should be unlisted and to 1 if the level should be only viewable by friends | Yes |
ldm | Set to 1 if the level should have a low detail checkbox | Yes |
levelString | The actual level data. Must be gzip compressed and then converted to URL-safe base64 | Yes |
seed2 | A mandatory chk value generated from the first 50 characters of the compressed level data | Yes |
secret | Common Secret: Wmfd2893gb7 | Yes |
wt | The amount of time spent in the editor of a level (local copy) | |
wt2 | The amount of time spent in the editor of a level (previous copies) | |
seed | A random string | |
extraString | A list of underscore seperated numbers. apparently used for rendering levels | |
levelInfo | A random gzip compressed string | |
binaryVersion | 42 | |
gdw | 0 |
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