Skip to content

Instantly share code, notes, and snippets.

@RoootTheFox
Last active April 29, 2024 15:47
Show Gist options
  • Save RoootTheFox/743c983092b4db2a9fec13341d25b61f to your computer and use it in GitHub Desktop.
Save RoootTheFox/743c983092b4db2a9fec13341d25b61f to your computer and use it in GitHub Desktop.
gd auth

DashAuth API

Warning

If you are a modder or a developer, please tell me what you think of the current specification and if/how it can be improved!


All responses use JSON as data type. ## Types

Token (used for client->3rd party requests): Bearer <random string>

Challenge:

Field Type Description
bot_account_id u32 Account ID of the Geometry Dash bot account that will validate the client
challenge String Randomly generated string (at least 8 characters, ASCII only) that will be sent to the bot for validation 
id UUID Random UUID that indicates a specific challenge, used to make the backend check if a challenge has been completed

Routes

GET [base url]/request_challenge/<gd account id>

Returns a Challenge

GET [base url]/challenge_complete/<challenge id>

Returns:

  • 200 Ok and a Token if successful
  • 404 Not Found if the challenge wasn't found
  • 401 Unauthorized if the challenge has not been validated.

side notes

It is recommended to return data in the following format:

{
  "success": bool,
  "message": "error description if failed",
  "data": "result data as json object (or string if token) if successful"
}

upcoming

  • different format for URLs (e.g. [base url]/request_challenge?acc=<gd account id> instead of arguments as paths)
  • specifics about server side implementations (challenge expiration, etc)

existing implementations

Project Developer Environment Language Notes
dashauth rooot Client C++ Official client API implementation
dashend rooot Server Rust Backend for my GD mods, uses auth

If you're a developer implementing this spec in your project and want it listed here, feel free to comment or to contact me

@RoootTheFox
Copy link
Author

RoootTheFox commented Apr 29, 2024

those 2 points are the reason i made this lmao (ty for the diagram btw!!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment