[PR #2445] [CLOSED] API - Add Client to inbounds #5110

Closed
opened 2026-10-31 20:44:47 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/2445
Author: @MrR4di0k4l
Created: 8/6/2024
Status: ❌ Closed

Base: main ← Head: main


📝 Commits (7)

📊 Changes

4 files changed (+0 additions, -2914 deletions)

View changed files

➖ README.md (+0 -533)
➖ web/controller/api.go (+0 -59)
➖ web/controller/inbound.go (+0 -329)
➖ web/service/inbound.go (+0 -1993)

📄 Description

Description

If the list of inboundIds is sent empty, a user will be created on all existing inbounds, otherwise, the inbound ID must be entered as follows:
"inboundIds": [1, 2]

Example

import requests

url = "http://localhost:2053/panel/api/inbounds/addClientInbounds"

payload = {'settings': '{"clients":[{"id":"983ecd09-6257-411d-a58c-fa7473ca3c0c","flow":"","email":"SpeedVpn","limitIp":2,"totalGB":32212254720,"expiryTime":1712927113000,"enable":true,"tgId":"","subId":"subId","reset":0}]}', 'inboundIds': []}
headers = {
  'Accept': 'application/json',
  'Cookie': '3x-ui=MTcyMjkzOTQwNnxEWDhFQVFMX2dBQUJFQUVRQUFCMV80QUFBUVp6ZEhKcGJtY01EQUFLVEU5SFNVNWZWVk5GVWhoNExYVnBMMlJoZEdGaVlYTmxMMjF2WkdWc0xsVnpaWExfZ1FNQkFRUlZjMlZ5QWYtQ0FBRUVBUUpKWkFFRUFBRUlWWE5sY201aGJXVUJEQUFCQ0ZCaGMzTjNiM0prQVF3QUFRdE1iMmRwYmxObFkzSmxkQUVNQUFBQUZQLUNFUUVDQVFWaFpHMXBiZ0VGWVdSdGFXNEF8uVa-901gifdCXLToceyxtfnjMOvHDZer53Ks2O0V6gA='
}

response = requests.request("POST", url, headers=headers, json=payload)

print(response.text)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/2445 **Author:** [@MrR4di0k4l](https://github.com/MrR4di0k4l) **Created:** 8/6/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (7) - [`e299365`](https://github.com/MHSanaei/3x-ui/commit/e299365c626524988608cf7970e15b2675a90603) API - Add Client to inbounds - [`b3e1052`](https://github.com/MHSanaei/3x-ui/commit/b3e1052c6189f67cb78fc82fa29ea2cc0c9ef912) API - Update Client to inbounds - [`16ed53e`](https://github.com/MHSanaei/3x-ui/commit/16ed53ef3151bd455e392f65d86d46447dda4701) fix bug - [`f5ce334`](https://github.com/MHSanaei/3x-ui/commit/f5ce334f75a107d85f4f310198f53d1811b62fa3) Delete web/controller/inbound.go - [`58dc093`](https://github.com/MHSanaei/3x-ui/commit/58dc0935661aa98454788ad33d6c328fa68b8340) Delete README.md - [`82a31b6`](https://github.com/MHSanaei/3x-ui/commit/82a31b67643f469b6541acceb893d94946083b38) Delete web/controller/api.go - [`2eaa209`](https://github.com/MHSanaei/3x-ui/commit/2eaa2098771cc3b3268acd579385adc807d74e34) Delete web/service/inbound.go ### 📊 Changes **4 files changed** (+0 additions, -2914 deletions) <details> <summary>View changed files</summary> ➖ `README.md` (+0 -533) ➖ `web/controller/api.go` (+0 -59) ➖ `web/controller/inbound.go` (+0 -329) ➖ `web/service/inbound.go` (+0 -1993) </details> ### 📄 Description ## Description If the list of inboundIds is sent empty, a user will be created on all existing inbounds, otherwise, the inbound ID must be entered as follows: "inboundIds": [1, 2] ## Example ```python import requests url = "http://localhost:2053/panel/api/inbounds/addClientInbounds" payload = {'settings': '{"clients":[{"id":"983ecd09-6257-411d-a58c-fa7473ca3c0c","flow":"","email":"SpeedVpn","limitIp":2,"totalGB":32212254720,"expiryTime":1712927113000,"enable":true,"tgId":"","subId":"subId","reset":0}]}', 'inboundIds': []} headers = { 'Accept': 'application/json', 'Cookie': '3x-ui=MTcyMjkzOTQwNnxEWDhFQVFMX2dBQUJFQUVRQUFCMV80QUFBUVp6ZEhKcGJtY01EQUFLVEU5SFNVNWZWVk5GVWhoNExYVnBMMlJoZEdGaVlYTmxMMjF2WkdWc0xsVnpaWExfZ1FNQkFRUlZjMlZ5QWYtQ0FBRUVBUUpKWkFFRUFBRUlWWE5sY201aGJXVUJEQUFCQ0ZCaGMzTjNiM0prQVF3QUFRdE1iMmRwYmxObFkzSmxkQUVNQUFBQUZQLUNFUUVDQVFWaFpHMXBiZ0VGWVdSdGFXNEF8uVa-901gifdCXLToceyxtfnjMOvHDZer53Ks2O0V6gA=' } response = requests.request("POST", url, headers=headers, json=payload) print(response.text) ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 20:44:47 +07:00
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#5110
No description provided.