validate
.validate() allows you to login on an already existing session ID, this can be used to change account or to log someone in
.validate(SessionID, username, password)
Login an already existing session ID to an account
Parameter
Type
Required
Description
SessionID
string
true
The session ID that you want to login
username
string
true
The username of the account you want to access
password
string
true
The password of the account you want to access
Example:
// Dependencies
const CubedCraft = require('cubed-api');
// Account Details
const username = 'ACCOUNT_USERNAME';
const password = 'ACCOUNT_PASSWORD';
// Defining The Session ID Variable
const sessionID = 'SESSION_ID';
// Logging Into The Account
CubedCraft.validate(sessionID, username, password)
Last updated
Was this helpful?