INFO
Supported Mods
  • Mawilite's "5*30"
  • The Golden Guard's "Golden 5"

Contact

DISCORD
zelo101
if you'd like to have your 5b mod supported!

STRUCT
Level
{
  "created": "2023-08-02 20:00:29.848Z",
  "creator": {
    "created": "2023-08-02 19:58:58.849Z",
    "discordId": "1032069168419319849",
    "id": "bo4wdr6syac901u",
    "levels": [
      "h2o60d2dqklmwdz"
    ],
    "stars": [],
    "updated": "2023-08-02 20:00:29.916Z",
    "username": "orangemario2009"
  },
  "data": "(levels.txt)",
  "description": "\"I want revenge!\"",
  "difficulty": 0,
  "featured": false,
  "id": "h2o60d2dqklmwdz",
  "title": "Ice Cube's Revenge!",
  "updated": "2023-08-02 20:00:29.848Z",
  "plays": 0,
  "unlisted": false
}
            
STRUCT
Levelpack
{
  "created": "2023-08-03 19:19:00.152Z",
  "creator": {
    "created": "2023-08-02 19:58:48.051Z",
    "discordId": "189004032600309760",
    "id": "3hfbpvnkpywte1k",
    "levelpacks": [
      "98doig139d2su27"
    ],
    "levels": [
      "mo4ze2nvbkvtsay",
      "8pjwict2l5b0v59",
      "4ljvua2t3n9zqvl"
    ],
    "stars": [],
    "updated": "2023-08-04 00:09:38.473Z",
    "username": "Zinc_Battery"
  },
  "description": "that i found in the database",
  "featured": false,
  "id": "98doig139d2su27",
  "levels": [
    "h2o60d2dqklmwdz",
    "7xh421meonyk67m",
    "52mlfgyz3w7szx4",
    "3i0pci3vqcy4t6z",
    "iu59zjjufi13487",
    "a28ei1gdvw2xtlw",
    "2bg7b6tbvdp2lub",
    "07g36jbp9j30s2w",
    "d6w28252kp0mpcy",
    "36mqgcgv30w2jb3",
    "b8daes3u6xoew8l",
    "n41zswfvn909cgb",
    "6mms3g04oy6ijqk",
    "i9scxz43qe96o4v",
    "ertlv22sxa75v23"
  ],
  "stars": 0,
  "title": "random levels",
  "updated": "2023-08-03 19:19:00.152Z",
  "plays": 0
}
            
STRUCT
User
{
  "created": "2023-08-02 19:58:58.929Z",
  "discordId": "1128443643221508187",
  "id": "buve7iifzkz8kzz",
  "levels": [
    "oayu8nm22wg3qyj",
    "986ycm3dw75g00t"
  ],
  "stars": [],
  "updated": "2023-08-02 20:00:30.089Z",
  "username": "ue"
}
            

There is a parameter in most endpoints that let you expand the levels property to actually include the levels.

GET
api/ level
Parameters
NameDescriptionTypeDefaults
idLevel IDINTEGER

Returns a

STRUCT Level
.

GET
api/ levelpack
Parameters
NameDescriptionTypeDefaults
idLevelpack IDINTEGER
levelsInclude LevelsINTEGER0

Level codes:

Level Codes
CodeMeaning
0Return Level ID's
1Return STRUCT Levels (can be slow)

Returns a

STRUCT Levelpack

GET
api/ user
Parameters
NameDescriptionTypeDefaults
idUser IDSTRING
discordIdUser's Discord IDSTRING

Returns a

STRUCT User
.

You can use either "id" or "discordId", but if you use both, only "id" will be used.

GET
api/ page
Parameters
NameDescriptionTypeDefaults
pagePage numberINTEGER
typeType ofINTEGER0
sortSort byINTEGER0
featuredOnly featured levels / levelpacksBOOLEANfalse
modOnly show levels / levelpacks that are for a specific 5b modSTRING

Returns a list of

STRUCT Level
.

Type codes:

Type Codes
CodeMeaning
0Levels
1Levelpacks

Sort codes:

Sort Codes
CodeMeaning
0Age (newest)
1Age (oldest)
2Plays (descending)
GET
api/ daily

Returns the daily

STRUCT Level
.

GET
api/ weekly

Returns the weekly

STRUCT Levelpack
challenge.

GET
api/ search
Parameters
NameDescriptionTypeDefaults
textSearch textSTRING
pagePage numberINTEGER
modOnly show levels that are for a specific 5b modSTRING

Returns a list of

STRUCT Level
who's title contains the search text. Levelpacks are not supported in search yet.

GET
api/ user/ page
Parameters
NameDescriptionTypeDefaults
idUser IDINTEGER
pagePage numberINTEGER
typeType ofINTEGER0
sortSort byINTEGER0
modOnly show levels / levelpacks that are for a specific 5b modSTRING

Returns a list of

STRUCT Level
created by the user.

Type codes:

Type Codes
CodeMeaning
0Levels
1Levelpacks

Sort codes:

Filter Codes
CodeMeaning
0Age (newest)
1Age (oldest)
2Plays (descending)
POST
api/ create/ level
Auth Required

For now, this endpoint can only be used on HTML5b's site. Let me know if you would like access to this.

Create a

STRUCT Level
. Make sure access_token is valid before posting! You will need to give 5beam the following using a FormData object:

PropertyMeaningType
access_tokenUser's discord access token.STRING
titleLevel titleSTRING
descriptionLevel descriptionSTRING
dataLevel fileFile
moddedWhat mod this level is for (Leave blank for HTML5b / Flash 5b)STRING
POST
api/ create/ levelpack
Auth Required

For now, this endpoint can only be used on HTML5b's site. Let me know if you would like access to this.

Create a

STRUCT Levelpack
. Make sure access_token is valid before posting! You will need to give 5beam the following using a FormData object:

PropertyMeaningType
access_tokenUser's discord access token.STRING
titleLevelpack titleSTRING
descriptionLevelpack descriptionSTRING
dataLevelpack fileFile
moddedWhat mod this levelpack is for (Leave blank for HTML5b / Flash 5b)STRING
GET
api/ auth/ discord

For now, this endpoint can only be used on HTML5b's site. Let me know if you would like access to this.

Endpoint for logging into 5beam discord oauth, returns an access & refresh token.

POST
api/ auth/ refresh
Auth Required

For now, this endpoint can only be used on HTML5b's site. Let me know if you would like access to this.

Gives you a new access_token. If this returns 400, it means your refresh_token is bad and you'll have to login again.

PropertyMeaningType
refresh_tokenUser's discord refresh token.STRING