[GH-ISSUE #3207] Does 3x-ui support API for client creation and subscription links? #2165

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

Originally created by @lavrentijav on GitHub (Jul 7, 2025).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3207

Question

Hello,

I'm building an external service (on a separate server) to automatically generate clients for a 3x-ui panel (version 2.6.0 or compatible forks).

I’d like to know whether your panel supports a REST API or any internal HTTP interface for this purpose.


✅ I’m specifically looking for:

  1. API support for client creation and management

    • Are there any available endpoints (GET, POST, PUT, DELETE)?
  2. How to create a client with the following configuration:

    • protocol: vless
    • transport: xhttp
    • security: reality
    • And fields such as:
      • uuid, email, expiry, pbk, sid, sni, spx, fp, etc.
  3. JSON format required for the POST request to create the client

  4. Subscription link retrieval:

    • Is there an API endpoint to get the subscription link (sub_url) or subscription_token?
    • If not, is it possible to rebuild the subscription URL manually using known client fields (like uuid)?

Any documentation or example requests would be appreciated.
If there is no official API, are there any local/unofficial interfaces I can work with?

Thanks in advance!

Checklist

  • This question is written entirely in English.
Originally created by @lavrentijav on GitHub (Jul 7, 2025). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/3207 ### Question Hello, I'm building an external service (on a separate server) to **automatically generate clients** for a 3x-ui panel (version `2.6.0` or compatible forks). I’d like to know whether your panel supports a **REST API** or any internal HTTP interface for this purpose. --- ### ✅ I’m specifically looking for: 1. **API support for client creation and management** - Are there any available endpoints (`GET`, `POST`, `PUT`, `DELETE`)? 2. **How to create a client with the following configuration:** - `protocol`: `vless` - `transport`: `xhttp` - `security`: `reality` - And fields such as: - `uuid`, `email`, `expiry`, `pbk`, `sid`, `sni`, `spx`, `fp`, etc. 3. **JSON format required** for the `POST` request to create the client 4. **Subscription link retrieval:** - Is there an API endpoint to get the `subscription link` (`sub_url`) or `subscription_token`? - If not, is it possible to **rebuild the subscription URL manually** using known client fields (like `uuid`)? --- Any documentation or example requests would be appreciated. If there is **no official API**, are there any local/unofficial interfaces I can work with? Thanks in advance! ### Checklist - [x] This question is written entirely in English.
bsakaguchi 2026-10-31 20:23:40 +07:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@Copift commented on GitHub (Jul 12, 2025):

hello
https://github.com/MHSanaei/3x-ui/wiki/Configuration#api
its official api for 3x-ui there
This api dont have special request for generate subscrition link but u can generate it with uuid user and settings inbound
url scheme
val = f"vless://{uuid}@{ip_server}:{port}/?type={tcp}&security={reality}&fp=chrome&pbk=T_95HnSovtH9WNr_XfaJ9iL7xnwp96p8E2A8Q3_t_xk&sni=microsoft.com&sid=24705084&spx=%2F#VPN-X3-{uuid}"
i recommended generate one link and copy all, change only uuid params

<!-- gh-comment-id:3065102525 --> @Copift commented on GitHub (Jul 12, 2025): hello https://github.com/MHSanaei/3x-ui/wiki/Configuration#api its official api for 3x-ui there This api dont have special request for generate subscrition link but u can generate it with uuid user and settings inbound url scheme val = f"vless://{uuid}@{ip_server}:{port}/?type={tcp}&security={reality}&fp=chrome&pbk=T_95HnSovtH9WNr_XfaJ9iL7xnwp96p8E2A8Q3_t_xk&sni=microsoft.com&sid=24705084&spx=%2F#VPN-X3-{uuid}" i recommended generate one link and copy all, change only uuid params
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#2165
No description provided.