This js code will authenticate with your Gunbot instance and get a JWT token response. For development use in building out gunbot api needs.
1️⃣ Prerequisites
- Node.js installed (v14+ recommended)
- npm (comes with Node.js)
- Your Gunbot password and Gunthy wallet key
- Your Gunbot URL (e.g.,
http://127.0.0.1:5000or your remote Gunbot server)
2️⃣ Save the Script
- Open your favorite text editor.
- download the final
gbtoken-genauthentication script. - Save it as:
gbtoken-gen.js
Example folder structure:
C:\gunbot\gbtoken-gen.js (Windows)
~/gunbot/gbtoken-gen.js (Linux)
3️⃣ Install Dependencies
Open a terminal/command prompt in the same folder as the script:
npm init -y
npm install axios readline-sync
axios→ to make HTTP requests to Gunbotreadline-sync→ to read password/wallet input securely
4️⃣ Running the Script
Windows (CMD or PowerShell)
- Open Command Prompt or PowerShell
- Navigate to the folder with the script:
cd C:\gunbot
- Run the script:
node gbtoken-gen.js
- You will be prompted to enter:
- Gunbot password (input hidden)
- Gunthy wallet key (input hidden)
- Gunbot URL
- If successful, you will see:
🔐 Encrypted password: ENC:...
✅ Gunbot authentication successful.
JWT Token: eyJhbGciOi...
Linux (Ubuntu / Debian / CentOS / etc.)
- Open Terminal
- Navigate to your script folder:
cd ~/gunbot
- Run the script:
node gbtoken-gen.js
- Enter your credentials when prompted.

Files
sha256: EB3617605A674886EE4EFC8F4796A7E2FA4323E5F816463A098EB957DBCF3604
#soonish
This software is provided “as is” for testing and development purposes only. No liability is assumed by the developer for any resulting losses or damages. The use of this software is entirely at your own risk.