🤖
Cubed-API
  • Cubed-API
  • Tutorials & Guides
    • Installing Cubed-API
    • Session IDs
    • Logging Into An Account
    • Selecting A Server To Edit
  • Documentation
    • login
    • getServers
    • selectServer
    • validate
    • Files
      • getFolder
      • read
      • edit
      • delete
      • createFolder
      • create
    • API
      • servers
      • server
      • topboosted
      • topvoted
      • player
        • bedwars
        • tntwars
        • warzone
        • info
    • utils
      • orderServers
      • playerUUID
  • Terms Of Use
  • Source Code (GitHub)
Powered by GitBook
On this page
  1. Documentation

login

.login() is used to generate a session ID for an account

PreviousSelecting A Server To EditNextgetServers

Last updated 4 years ago

Was this helpful?

CtrlK

Was this helpful?

.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';

Read the guide on session IDs: https://pondwadermc.gitbook.io/cubed-api/tutorials-and-guides/sessions

// Defining The Session ID Variable
var sessionID;
// Logging Into The Account
CubedCraft.login(username, password).then(ses => sessionID = ses);