login
.login() is used to generate a session ID for an account
.login(username, password)
Generate a session ID for an account
Parameter
Type
Required
Description
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
var sessionID;
// Logging Into The Account
CubedCraft.login(username, password).then(ses => sessionID = ses);
Last updated
Was this helpful?