gjrequest.js
v1.0.0
Published
Geometry Dash API - Powered by GDPlatform.
Downloads
110
Maintainers
Readme
gjrequest.js
A lightweight Node.js SDK for interacting with the Geometry Dash API (GDPlatform-powered). Handles login, reading/sending messages, and fetching level scores using
gjp2.
Features
- Login with
accountID+ password (generatesgjp2) - Read inbox or sent messages
- Send messages (Base64-encoded)
- Fetch level scores
- Generic endpoint requests via
requestEndpoint()
Installation
npm install gjrequest.jsOr copy the module locally if not published.
Usage
require("dotenv").config();
const { Client } = require("gjrequest.js");
(async () => {
const client = new Client();
// Login securely via environment variables
await client.login({
accountID: process.env.GD_ACCOUNT_ID,
password: process.env.GD_PASSWORD
});
// Read inbox messages
const inbox = await client.readMessages();
console.log(inbox);
// Send a message
const sent = await client.sendMessage(
29294657,
"Hello World",
"This is a test message!"
);
console.log(sent);
// Get level scores
const scores = await client.getLevelScores(1234567);
console.log(scores);
// Generic endpoint request
const response = await client.requestEndpoint("uploadGJMessage20.php", {
toAccountID: 29294657,
subject: Buffer.from("Test").toString("base64"),
body: Buffer.from("Hello!").toString("base64")
});
console.log(response);
})();Security Notes
- Do NOT hardcode your GD password in public repositories.
- Use environment variables (
.env) or other secure storage. gjp2is generated locally; no real login is sent except the hashed payload.
References
License
MIT © SkunkPlatform
