[GH-ISSUE #4557] [Bug]: #3121

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

Originally created by @chinajonical on GitHub (May 25, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4557

Describe the bug

3X-UI,API Invalid,PHP code:

$api = 'http://[Server IP]:[PORT]/[PATH]//login'';
$ch = curl_init();
$data = [
'username' => 'account',
'password' => 'password',
'twoFactorCode' => ''
];
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_URL,$api);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer [Your TOKEN]',
'Accept: application/json'
]);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($ch);
curl_close($ch);
print_r($response);

The result is empty;

How to reproduce the problem

API result empty;

Expected behavior

API result empty;

Actual behavior

API result empty;

Relevant logs

API result empty;

Screenshots

API result empty;

3x-ui version

3.1.0

Xray-core version

26.5.9

How did you install 3x-ui?

Other (please describe in the bug body)

Operating system

ubuntu 22.04

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?

Yes — Nginx

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 @chinajonical on GitHub (May 25, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4557 ### Describe the bug 3X-UI,API Invalid,PHP code: $api = 'http://[Server IP]:[PORT]/[PATH]//login''; $ch = curl_init(); $data = [ 'username' => 'account', 'password' => 'password', 'twoFactorCode' => '' ]; curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_URL,$api); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer [Your TOKEN]', 'Accept: application/json' ]); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); $response = curl_exec($ch); curl_close($ch); print_r($response); The result is empty; ### How to reproduce the problem API result empty; ### Expected behavior API result empty; ### Actual behavior API result empty; ### Relevant logs ```shell API result empty; ``` ### Screenshots API result empty; ### 3x-ui version 3.1.0 ### Xray-core version 26.5.9 ### How did you install 3x-ui? Other (please describe in the bug body) ### Operating system ubuntu 22.04 ### 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? Yes — Nginx ### 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:30:14 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Aurora211 commented on GitHub (May 25, 2026):

I encountered the same bug today while writing Python. When 3XUI is behind Nginx's reverse proxy, all API endpoints return a 404 error when using a Token, and normal results cannot be obtained. Are you experiencing the same issue?

<!-- gh-comment-id:4533091809 --> @Aurora211 commented on GitHub (May 25, 2026): I encountered the same bug today while writing Python. When 3XUI is behind Nginx's reverse proxy, all API endpoints return a 404 error when using a Token, and normal results cannot be obtained. Are you experiencing the same issue?
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#3121
No description provided.