3xui-api-client 2.0.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,317 +1,374 @@
1
- # 3xui-api-client
2
-
3
- A Node.js client library for 3x-ui panel API that provides easy-to-use methods for managing your 3x-ui server.
4
-
5
- [![npm version](https://badge.fury.io/js/3xui-api-client.svg)](https://badge.fury.io/js/3xui-api-client)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
-
8
- ## Features
9
-
10
- - ✅ **Authentication** - Secure login with automatic session management
11
- - ✅ **Inbound Management** - Get, add, update, and delete inbounds
12
- - ✅ **Client Management** - Add, update, delete clients and monitor traffic
13
- - ✅ **Traffic Management** - Monitor, reset, and manage traffic limits
14
- - ✅ **System Operations** - Backup creation and online client monitoring
15
- - ✅ **Complete API Coverage** - All 19 API routes fully tested and working
16
-
17
- ## Installation
18
-
19
- ```bash
20
- npm install 3xui-api-client
21
- ```
22
-
23
- ## Context7 MCP Integration
24
-
25
- This library can be implemented with the help of [Context7 MCP](https://context7.com/iamhelitha/3xui-api-client). Use the package name `3xui-api-client` to get context and documentation through Context7's Model Context Protocol integration.
26
-
27
- Learn more about [Context7 MCP](https://context7.com) for enhanced development experience.
28
-
29
- ## Quick Start
30
-
31
- ```javascript
32
- const ThreeXUI = require('3xui-api-client');
33
-
34
- const client = new ThreeXUI('https://your-3xui-server.com', 'username', 'password');
35
-
36
- // Get all inbounds
37
- client.getInbounds()
38
- .then(inbounds => {
39
- console.log('Inbounds:', inbounds);
40
- })
41
- .catch(error => {
42
- console.error('Error:', error.message);
43
- });
44
- ```
45
-
46
- ## Authentication & Security
47
-
48
- ### Automatic Login
49
- The client automatically handles authentication. When you make your first API call, it will:
50
- 1. Login with your credentials
51
- 2. Store the session cookie
52
- 3. Use the cookie for subsequent requests
53
- 4. Automatically re-login if the session expires
54
-
55
- ### Server-Side Cookie Storage (Recommended)
56
- For production applications, store the session cookie securely on your server:
57
-
58
- ```javascript
59
- const ThreeXUI = require('3xui-api-client');
60
-
61
- class SecureThreeXUIManager {
62
- constructor(baseURL, username, password) {
63
- this.client = new ThreeXUI(baseURL, username, password);
64
- this.sessionCookie = null;
65
- }
66
-
67
- async ensureAuthenticated() {
68
- if (!this.sessionCookie) {
69
- const loginResult = await this.client.login();
70
- this.sessionCookie = this.client.cookie;
71
-
72
- // Store in secure session storage (Redis, database, etc.)
73
- await this.storeSessionSecurely(this.sessionCookie);
74
- } else {
75
- // Restore from secure storage
76
- this.client.cookie = this.sessionCookie;
77
- this.client.api.defaults.headers.Cookie = this.sessionCookie;
78
- }
79
- }
80
-
81
- async storeSessionSecurely(cookie) {
82
- // Example: Store in Redis with expiration
83
- // await redis.setex('3xui_session', 3600, cookie);
84
-
85
- // Example: Store in database
86
- // await db.sessions.upsert({ service: '3xui', cookie, expires_at: new Date(Date.now() + 3600000) });
87
- }
88
-
89
- async getInbounds() {
90
- await this.ensureAuthenticated();
91
- return this.client.getInbounds();
92
- }
93
- }
94
- ```
95
-
96
- ## API Reference
97
-
98
- ### Constructor
99
- ```javascript
100
- new ThreeXUI(baseURL, username, password)
101
- ```
102
-
103
- - `baseURL` (string): Your 3x-ui server URL (e.g., 'https://your-server.com')
104
- - `username` (string): Admin username
105
- - `password` (string): Admin password
106
-
107
- ### Inbound Management (✅ Tested & Working)
108
-
109
- #### Get All Inbounds
110
- ```javascript
111
- const inbounds = await client.getInbounds();
112
- console.log(inbounds);
113
- ```
114
-
115
- #### Get Specific Inbound
116
- ```javascript
117
- const inbound = await client.getInbound(inboundId);
118
- console.log(inbound);
119
- ```
120
-
121
- #### Add New Inbound
122
- ```javascript
123
- const inboundConfig = {
124
- remark: "My VPN Server",
125
- port: 443,
126
- protocol: "vless",
127
- settings: {
128
- // Your inbound settings
129
- }
130
- };
131
-
132
- const result = await client.addInbound(inboundConfig);
133
- console.log('Inbound added:', result);
134
- ```
135
-
136
- #### Update Inbound
137
- ```javascript
138
- const updatedConfig = {
139
- remark: "Updated VPN Server",
140
- // Other updated settings
141
- };
142
-
143
- const result = await client.updateInbound(inboundId, updatedConfig);
144
- console.log('Inbound updated:', result);
145
- ```
146
-
147
- #### Delete Inbound
148
- ```javascript
149
- const result = await client.deleteInbound(inboundId);
150
- console.log('Inbound deleted:', result);
151
- ```
152
-
153
- ### Client Management (✅ Tested & Working)
154
-
155
- #### Add Client to Inbound
156
- ```javascript
157
- const clientConfig = {
158
- id: inboundId,
159
- settings: JSON.stringify({
160
- clients: [{
161
- id: "client-uuid-here",
162
- email: "user23c5n7",
163
- limitIp: 0,
164
- totalGB: 0,
165
- expiryTime: 0,
166
- enable: true
167
- }]
168
- })
169
- };
170
-
171
- const result = await client.addClient(clientConfig);
172
- ```
173
-
174
- #### Update Client
175
- ```javascript
176
- const updateConfig = {
177
- id: inboundId,
178
- settings: JSON.stringify({
179
- clients: [/* updated client settings */]
180
- })
181
- };
182
-
183
- const result = await client.updateClient(clientUUID, updateConfig);
184
- ```
185
-
186
- #### Delete Client
187
- ```javascript
188
- const result = await client.deleteClient(inboundId, clientUUID);
189
- ```
190
-
191
- #### Get Client Traffic by Email
192
- ```javascript
193
- const traffic = await client.getClientTrafficsByEmail("user23c5n7");
194
- console.log('Client traffic:', traffic);
195
- ```
196
-
197
- #### Get Client Traffic by UUID
198
- ```javascript
199
- const traffic = await client.getClientTrafficsById("client-uuid");
200
- console.log('Client traffic:', traffic);
201
- ```
202
-
203
- #### Manage Client IPs
204
- ```javascript
205
- // Get client IPs
206
- const ips = await client.getClientIps("user23c5n7");
207
-
208
- // Clear client IPs
209
- const result = await client.clearClientIps("user23c5n7");
210
- ```
211
-
212
- ### Traffic Management (✅ Tested & Working)
213
-
214
- #### Reset Individual Client Traffic
215
- ```javascript
216
- const result = await client.resetClientTraffic(inboundId, "user23c5n7");
217
- ```
218
-
219
- #### Reset All Traffic (Global)
220
- ```javascript
221
- const result = await client.resetAllTraffics();
222
- ```
223
-
224
- #### Reset All Client Traffic in Inbound
225
- ```javascript
226
- const result = await client.resetAllClientTraffics(inboundId);
227
- ```
228
-
229
- #### Delete Depleted Clients
230
- ```javascript
231
- const result = await client.deleteDepletedClients(inboundId);
232
- ```
233
-
234
- ### System Operations (✅ Tested & Working)
235
-
236
- #### Get Online Clients
237
- ```javascript
238
- const onlineClients = await client.getOnlineClients();
239
- console.log('Currently online:', onlineClients);
240
- ```
241
-
242
- #### Create System Backup
243
- ```javascript
244
- const result = await client.createBackup();
245
- console.log('Backup created:', result);
246
- ```
247
-
248
- ## Documentation
249
-
250
- For comprehensive guides, examples, and implementation patterns, visit our [Wiki](https://github.com/iamhelitha/3xui-api-client/wiki):
251
-
252
- - 📚 [**Use Cases & Examples**](https://github.com/iamhelitha/3xui-api-client/wiki/Use-Cases) - VPN service provider, server administration, monitoring dashboards
253
- - 🔐 [**Authentication Guide**](https://github.com/iamhelitha/3xui-api-client/wiki/Authentication-Guide) - Secure login and session management
254
- - 🌐 [**Inbound Management**](https://github.com/iamhelitha/3xui-api-client/wiki/Inbound-Management) - Server configuration and setup
255
- - 👥 [**Client Management**](https://github.com/iamhelitha/3xui-api-client/wiki/Client-Management) - User account operations
256
- - 📊 [**Traffic Management**](https://github.com/iamhelitha/3xui-api-client/wiki/Traffic-Management) - Usage monitoring and billing
257
- - ⚙️ [**System Operations**](https://github.com/iamhelitha/3xui-api-client/wiki/System-Operations) - Backup and maintenance
258
-
259
- ## Error Handling
260
-
261
- ```javascript
262
- try {
263
- const inbounds = await client.getInbounds();
264
- console.log(inbounds);
265
- } catch (error) {
266
- if (error.message.includes('Login failed')) {
267
- console.error('Authentication error:', error.message);
268
- } else if (error.response?.status === 401) {
269
- console.error('Unauthorized - check your credentials');
270
- } else {
271
- console.error('API error:', error.message);
272
- }
273
- }
274
- ```
275
-
276
- ## Requirements
277
-
278
- - Node.js >= 14.0.0
279
- - 3x-ui panel with API access enabled
280
-
281
- ## Contributing
282
-
283
- 1. Fork the repository
284
- 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
285
- 3. Commit your changes (`git commit -m 'Add some amazing feature'`)
286
- 4. Push to the branch (`git push origin feature/amazing-feature`)
287
- 5. Open a Pull Request
288
-
289
- ## Testing
290
-
291
- ```bash
292
- # Run login test
293
- npm run test:login
294
-
295
- # Run all tests
296
- npm test
297
- ```
298
-
299
-
300
-
301
- ## License
302
-
303
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
304
-
305
- ## Support
306
-
307
- - 📖 [Wiki & Documentation](https://github.com/iamhelitha/3xui-api-client/wiki)
308
- - 🐛 [Report Issues](https://github.com/iamhelitha/3xui-api-client/issues)
309
- - 💬 [Discussions](https://github.com/iamhelitha/3xui-api-client/discussions)
310
-
311
- ## Author
312
-
313
- **Helitha Guruge** - [@iamhelitha](https://github.com/iamhelitha)
314
-
315
- ---
316
-
317
- ⚠️ **Security Notice**: Always store credentials and session cookies securely. Never expose them in client-side code or commit them to version control.
1
+ # 3xui-api-client
2
+
3
+ A Node.js client library for 3x-ui panel API that provides easy-to-use methods for managing your 3x-ui server.
4
+
5
+ [![npm version](https://badge.fury.io/js/3xui-api-client.svg)](https://badge.fury.io/js/3xui-api-client)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ## Features
9
+
10
+ - ✅ **Authentication** - Secure login with automatic session management and cookie handling
11
+ - ✅ **Security** - Built-in input validation, secure headers, and rate limiting
12
+ - ✅ **Inbound Management** - Get, add, update, and delete inbounds
13
+ - ✅ **Client Management** - Add, update, delete clients and monitor traffic
14
+ - ✅ **Traffic Management** - Monitor, reset, and manage traffic limits
15
+ - ✅ **System Operations** - Backup creation and online client monitoring
16
+ - ✅ **Complete API Coverage** - All 19 API routes fully tested and working
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ npm install 3xui-api-client
22
+ ```
23
+
24
+ ## Context7 MCP Integration
25
+
26
+ This library can be implemented with the help of [Context7 MCP](https://context7.com/iamhelitha/3xui-api-client). Use the package name `3xui-api-client` to get context and documentation through Context7's Model Context Protocol integration.
27
+
28
+ Learn more about [Context7 MCP](https://context7.com) for enhanced development experience.
29
+
30
+ ## Quick Start
31
+
32
+ ```javascript
33
+ const ThreeXUI = require('3xui-api-client');
34
+
35
+ const client = new ThreeXUI('https://your-3xui-server.com', 'username', 'password');
36
+
37
+ // Get all inbounds
38
+ client.getInbounds()
39
+ .then(inbounds => {
40
+ console.log('Inbounds:', inbounds);
41
+ })
42
+ .catch(error => {
43
+ console.error('Error:', error.message);
44
+ });
45
+ ```
46
+
47
+ ## Configuration & Best Practices
48
+
49
+ ### Using Environment Variables (Recommended)
50
+ Never hardcode your credentials in your code. Use environment variables to store sensitive information.
51
+
52
+ > **IMPORTANT NOTE**: The `PANEL_URL` should be the root URL of your server **WITHOUT** the `/panel` suffix.
53
+ > - Correct: `https://your-domain.com:2053` or `https://your-domain.com/secret-path`
54
+ > - ❌ Incorrect: `https://your-domain.com:2053/panel`
55
+ >
56
+ > The library automatically appends `/panel` and other necessary paths. Including it in your configuration will cause 404 errors.
57
+
58
+ 1. Create a `.env` file in your project root:
59
+ ```env
60
+ PANEL_URL=http://your-server-ip:2053
61
+ PANEL_USERNAME=admin
62
+ PANEL_PASSWORD=your_secure_password
63
+ ```
64
+
65
+ 2. Install `dotenv`:
66
+ ```bash
67
+ npm install dotenv
68
+ ```
69
+
70
+ 3. Initialize the client:
71
+ ```javascript
72
+ require('dotenv').config();
73
+ const ThreeXUI = require('3xui-api-client');
74
+
75
+ const client = new ThreeXUI(
76
+ process.env.PANEL_URL,
77
+ process.env.PANEL_USERNAME,
78
+ process.env.PANEL_PASSWORD
79
+ );
80
+ ```
81
+
82
+ ## Authentication & Security
83
+
84
+ ### Automatic Login
85
+ The client automatically handles authentication. When you make your first API call, it will:
86
+ 1. Login with your credentials
87
+ 2. Store the session cookie
88
+ 3. Use the cookie for subsequent requests
89
+ 4. Automatically re-login if the session expires
90
+
91
+ ### Server-Side Cookie Storage (Recommended)
92
+ For production applications, store the session cookie securely on your server. The `login()` method returns the cookie for this purpose:
93
+
94
+ ```javascript
95
+ const ThreeXUI = require('3xui-api-client');
96
+
97
+ class SecureThreeXUIManager {
98
+ constructor(baseURL, username, password) {
99
+ this.client = new ThreeXUI(baseURL, username, password);
100
+ this.sessionCookie = null;
101
+ }
102
+
103
+ async ensureAuthenticated() {
104
+ if (!this.sessionCookie) {
105
+ const loginResult = await this.client.login();
106
+
107
+ // The cookie is returned in the login result
108
+ this.sessionCookie = loginResult.cookie;
109
+
110
+ // Store in secure session storage (Redis, database, etc.)
111
+ await this.storeSessionSecurely(this.sessionCookie);
112
+ } else {
113
+ // Restore from secure storage
114
+ this.client.cookie = this.sessionCookie;
115
+ this.client.api.defaults.headers.Cookie = this.sessionCookie;
116
+ }
117
+ }
118
+
119
+ async storeSessionSecurely(cookie) {
120
+ // Example: Store in Redis with expiration
121
+ // await redis.setex('3xui_session', 3600, cookie);
122
+
123
+ // Example: Store in database
124
+ // await db.sessions.upsert({ service: '3xui', cookie, expires_at: new Date(Date.now() + 3600000) });
125
+ }
126
+
127
+ async getInbounds() {
128
+ await this.ensureAuthenticated();
129
+ return this.client.getInbounds();
130
+ }
131
+ }
132
+ ```
133
+
134
+ ### Security Features
135
+ The library includes several security enhancements:
136
+ - **Input Validation**: Validates URLs, usernames, and passwords to prevent injection attacks.
137
+ - **Secure Headers**: Automatically adds security headers to requests.
138
+ - **Rate Limiting**: Prevents abuse by limiting request rates (configurable).
139
+ - **Error Sanitization**: Hides sensitive details in production errors.
140
+
141
+ ## API Reference
142
+
143
+ ### Constructor
144
+ ```javascript
145
+ new ThreeXUI(baseURL, username, password)
146
+ ```
147
+
148
+ - `baseURL` (string): Your 3x-ui server URL (e.g., 'https://your-server.com')
149
+ - `username` (string): Admin username
150
+ - `password` (string): Admin password
151
+
152
+ ### Inbound Management (✅ Tested & Working)
153
+
154
+ #### Get All Inbounds
155
+ ```javascript
156
+ const inbounds = await client.getInbounds();
157
+ console.log(inbounds);
158
+ ```
159
+
160
+ #### Get Specific Inbound
161
+ ```javascript
162
+ const inbound = await client.getInbound(inboundId);
163
+ console.log(inbound);
164
+ ```
165
+
166
+ #### Add New Inbound
167
+ ```javascript
168
+ const inboundConfig = {
169
+ remark: "My VPN Server",
170
+ port: 443,
171
+ protocol: "vless",
172
+ settings: {
173
+ // Your inbound settings
174
+ }
175
+ };
176
+
177
+ const result = await client.addInbound(inboundConfig);
178
+ console.log('Inbound added:', result);
179
+ ```
180
+
181
+ #### Update Inbound
182
+ ```javascript
183
+ const updatedConfig = {
184
+ remark: "Updated VPN Server",
185
+ // Other updated settings
186
+ };
187
+
188
+ const result = await client.updateInbound(inboundId, updatedConfig);
189
+ console.log('Inbound updated:', result);
190
+ ```
191
+
192
+ #### Delete Inbound
193
+ ```javascript
194
+ const result = await client.deleteInbound(inboundId);
195
+ console.log('Inbound deleted:', result);
196
+ ```
197
+
198
+ ### Client Management (✅ Tested & Working)
199
+
200
+ #### Add Client to Inbound
201
+ ```javascript
202
+ const clientConfig = {
203
+ id: inboundId,
204
+ settings: JSON.stringify({
205
+ clients: [{
206
+ id: "client-uuid-here",
207
+ email: "user23c5n7",
208
+ limitIp: 0,
209
+ totalGB: 0,
210
+ expiryTime: 0,
211
+ enable: true
212
+ }]
213
+ })
214
+ };
215
+
216
+ const result = await client.addClient(clientConfig);
217
+ ```
218
+
219
+ #### Update Client
220
+ ```javascript
221
+ const updateConfig = {
222
+ id: inboundId,
223
+ settings: JSON.stringify({
224
+ clients: [/* updated client settings */]
225
+ })
226
+ };
227
+
228
+ const result = await client.updateClient(clientUUID, updateConfig);
229
+ ```
230
+
231
+ #### Delete Client
232
+ ```javascript
233
+ const result = await client.deleteClient(inboundId, clientUUID);
234
+ ```
235
+
236
+ #### Get Client Traffic by Email
237
+ ```javascript
238
+ const traffic = await client.getClientTrafficsByEmail("user23c5n7");
239
+ console.log('Client traffic:', traffic);
240
+ ```
241
+
242
+ #### Get Client Traffic by UUID
243
+ ```javascript
244
+ const traffic = await client.getClientTrafficsById("client-uuid");
245
+ console.log('Client traffic:', traffic);
246
+ ```
247
+
248
+ #### Manage Client IPs
249
+ ```javascript
250
+ // Get client IPs
251
+ const ips = await client.getClientIps("user23c5n7");
252
+
253
+ // Clear client IPs
254
+ const result = await client.clearClientIps("user23c5n7");
255
+ ```
256
+
257
+ ### Traffic Management ( Tested & Working)
258
+
259
+ #### Reset Individual Client Traffic
260
+ ```javascript
261
+ const result = await client.resetClientTraffic(inboundId, "user23c5n7");
262
+ ```
263
+
264
+ #### Reset All Traffic (Global)
265
+ ```javascript
266
+ const result = await client.resetAllTraffics();
267
+ ```
268
+
269
+ #### Reset All Client Traffic in Inbound
270
+ ```javascript
271
+ const result = await client.resetAllClientTraffics(inboundId);
272
+ ```
273
+
274
+ #### Delete Depleted Clients
275
+ ```javascript
276
+ const result = await client.deleteDepletedClients(inboundId);
277
+ ```
278
+
279
+ ### System Operations (✅ Tested & Working)
280
+
281
+ #### Get Online Clients
282
+ ```javascript
283
+ const onlineClients = await client.getOnlineClients();
284
+ console.log('Currently online:', onlineClients);
285
+ ```
286
+
287
+ #### Create System Backup
288
+ ```javascript
289
+ const result = await client.createBackup();
290
+ console.log('Backup created:', result);
291
+ ```
292
+
293
+ #### Send Backup to Telegram Bot
294
+ ```javascript
295
+ const tgResult = await client.backupToTgBot();
296
+ console.log('Backup sent to Telegram:', tgResult);
297
+ ```
298
+
299
+ #### Get Server Status
300
+ ```javascript
301
+ const status = await client.getServerStatus();
302
+ console.log('Server status:', status);
303
+ ```
304
+
305
+ ## Documentation
306
+
307
+ For comprehensive guides, examples, and implementation patterns, visit our [Wiki](https://github.com/iamhelitha/3xui-api-client/wiki):
308
+
309
+ - 📚 [**Use Cases & Examples**](https://github.com/iamhelitha/3xui-api-client/wiki/Use-Cases) - VPN service provider, server administration, monitoring dashboards
310
+ - 🔐 [**Authentication Guide**](https://github.com/iamhelitha/3xui-api-client/wiki/Authentication-Guide) - Secure login and session management
311
+ - 🌐 [**Inbound Management**](https://github.com/iamhelitha/3xui-api-client/wiki/Inbound-Management) - Server configuration and setup
312
+ - 👥 [**Client Management**](https://github.com/iamhelitha/3xui-api-client/wiki/Client-Management) - User account operations
313
+ - 📊 [**Traffic Management**](https://github.com/iamhelitha/3xui-api-client/wiki/Traffic-Management) - Usage monitoring and billing
314
+ - ⚙️ [**System Operations**](https://github.com/iamhelitha/3xui-api-client/wiki/System-Operations) - Backup and maintenance
315
+
316
+ ## Error Handling
317
+
318
+ ```javascript
319
+ try {
320
+ const inbounds = await client.getInbounds();
321
+ console.log(inbounds);
322
+ } catch (error) {
323
+ if (error.message.includes('Login failed')) {
324
+ console.error('Authentication error:', error.message);
325
+ } else if (error.response?.status === 401) {
326
+ console.error('Unauthorized - check your credentials');
327
+ } else {
328
+ console.error('API error:', error.message);
329
+ }
330
+ }
331
+ ```
332
+
333
+ ## Requirements
334
+
335
+ - Node.js >= 14.0.0
336
+ - 3x-ui panel with API access enabled
337
+
338
+ ## Contributing
339
+
340
+ 1. Fork the repository
341
+ 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
342
+ 3. Commit your changes (`git commit -m 'Add some amazing feature'`)
343
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
344
+ 5. Open a Pull Request
345
+
346
+ ## Testing
347
+
348
+ ```bash
349
+ # Run login test
350
+ npm run test:login
351
+
352
+ # Run all tests
353
+ npm test
354
+ ```
355
+
356
+
357
+
358
+ ## License
359
+
360
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
361
+
362
+ ## Support
363
+
364
+ - 📖 [Wiki & Documentation](https://github.com/iamhelitha/3xui-api-client/wiki)
365
+ - 🐛 [Report Issues](https://github.com/iamhelitha/3xui-api-client/issues)
366
+ - 💬 [Discussions](https://github.com/iamhelitha/3xui-api-client/discussions)
367
+
368
+ ## Author
369
+
370
+ **Helitha Guruge** - [@iamhelitha](https://github.com/iamhelitha)
371
+
372
+ ---
373
+
374
+ ⚠️ **Security Notice**: Always store credentials and session cookies securely. Never expose them in client-side code or commit them to version control.