[GH-ISSUE #5181] [Bug]: Api doesn't have ability to change Subscription ID & Passwords #3638

Closed
opened 2026-10-31 20:33:53 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @elegance666 on GitHub (Jun 10, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5181

Describe the bug

ورژن ۳.۳ خیلی خوبه، فقط با ای‌پی‌آی نمیشه پسوردها عوض کرد

How to reproduce the problem

1

Expected behavior

اگر تو اوتباند هم یک فیلد باشه برای comment ادمین خیلی خوب میشه

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.3

Xray-core version

No response

How did you install 3x-ui?

install.sh script

Operating system

Ubintu 22

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

None

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @elegance666 on GitHub (Jun 10, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5181 ### Describe the bug ورژن ۳.۳ خیلی خوبه، فقط با ای‌پی‌آی نمیشه پسوردها عوض کرد ### How to reproduce the problem 1 ### Expected behavior اگر تو اوتباند هم یک فیلد باشه برای comment ادمین خیلی خوب میشه ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.3 ### Xray-core version _No response_ ### How did you install 3x-ui? install.sh script ### Operating system Ubintu 22 ### Which parts of the panel are affected? _No response_ ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? None ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:33:53 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Jun 10, 2026):

سلام @elegance666 👋

خوشحالیم که از نسخه ۳.۳ راضی هستید!

در مورد تغییر Password و Subscription ID از طریق API:

این قابلیت از قبل در API وجود دارد — فقط باید آن‌ها را در body درخواست POST ارسال کنید. بررسی کد (internal/web/service/client_crud.go) نشان می‌دهد که اگر مقدار پاس بدهید، به‌روزرسانی می‌شود؛ و اگر خالی بگذارید، مقدار قبلی حفظ می‌شود.

Endpoint:

POST /panel/api/clients/update/{email}

مثال — تغییر همزمان password و subId:

{
  "email": "user@example.com",
  "password": "new_password_here",
  "subId": "new-subscription-id-here",
  "enable": true,
  "totalGB": 0,
  "expiryTime": 0
}

نکته: برای تغییر فقط یکی از فیلدها، همان یکی را در body بگذارید؛ سایر فیلدها (مثل totalGB و expiryTime) اگر در body نباشند، مقدار 0 گرفته می‌شوند، پس بهتر است همه فیلدهای مورد نیاز را ارسال کنید.

نمونه با curl:

curl -X POST "https://your-panel/panel/api/clients/update/user@example.com" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.com","password":"newpass123","subId":"new-uuid","enable":true,"totalGB":0,"expiryTime":0}'

مستندات کامل API از طریق Swagger در پنل شما در دسترس است (مسیر /panel/api/swagger یا لینکی که در تنظیمات پنل نمایش داده می‌شود).


در مورد فیلد comment برای outbound:

این یک درخواست feature جداست. در حال حاضر مدل OutboundSubscription فقط فیلد remark دارد و comment ندارد. اگر می‌خواهید این قابلیت اضافه شود، می‌توانید یک issue جداگانه با برچسب enhancement باز کنید و جزئیات use-case خود را توضیح دهید تا maintainer‌ها آن را بررسی کنند.

<!-- gh-comment-id:4673737264 --> @github-actions[bot] commented on GitHub (Jun 10, 2026): سلام @elegance666 👋 خوشحالیم که از نسخه ۳.۳ راضی هستید\! **در مورد تغییر Password و Subscription ID از طریق API:** این قابلیت **از قبل در API وجود دارد** — فقط باید آن‌ها را در body درخواست `POST` ارسال کنید. بررسی کد (`internal/web/service/client_crud.go`) نشان می‌دهد که اگر مقدار پاس بدهید، به‌روزرسانی می‌شود؛ و اگر خالی بگذارید، مقدار قبلی حفظ می‌شود. **Endpoint:** ``` POST /panel/api/clients/update/{email} ``` **مثال — تغییر همزمان password و subId:** ```json { "email": "user@example.com", "password": "new_password_here", "subId": "new-subscription-id-here", "enable": true, "totalGB": 0, "expiryTime": 0 } ``` > **نکته:** برای تغییر فقط یکی از فیلدها، همان یکی را در body بگذارید؛ سایر فیلدها (مثل `totalGB` و `expiryTime`) اگر در body نباشند، مقدار `0` گرفته می‌شوند، پس بهتر است همه فیلدهای مورد نیاز را ارسال کنید. **نمونه با curl:** ```bash curl -X POST "https://your-panel/panel/api/clients/update/user@example.com" \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{"email":"user@example.com","password":"newpass123","subId":"new-uuid","enable":true,"totalGB":0,"expiryTime":0}' ``` مستندات کامل API از طریق Swagger در پنل شما در دسترس است (مسیر `/panel/api/swagger` یا لینکی که در تنظیمات پنل نمایش داده می‌شود). --- **در مورد فیلد comment برای outbound:** این یک درخواست feature جداست. در حال حاضر مدل `OutboundSubscription` فقط فیلد `remark` دارد و `comment` ندارد. اگر می‌خواهید این قابلیت اضافه شود، می‌توانید یک issue جداگانه با برچسب **enhancement** باز کنید و جزئیات use-case خود را توضیح دهید تا maintainer‌ها آن را بررسی کنند.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#3638
No description provided.