Skip to content

[Bug] API调用问题 #10332

Closed
Closed

Description

@xiaoxiaozhoutop

Contact Information

No response

1Panel Version

2.0.10

Problem Description

PS C:\Users\16857\Documents\cd\panel> curl -X GET "http://192.168.0.8:26462/api/v1/dashboard/current" \

-H "1Panel-Token: XjFlNrH2SSQCOlIEK94T2ttLM50fAmLg"
-H "1Panel-Timestamp: <current_unix_timestamp>"

<title>暂时无法访问</title> <style> body { font-family: Arial, sans-serif; text-align: center; background-color: #f9f9f9; margin: 0; padding: 0; color: #333; } .container { max-width: 600px; margin: 50px auto; padding: 20px; background: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); border-radius: 8px; } .icon img { width: 100px; height: auto; } h1 { font-size: 24px; color: #555; } p { font-size: 16px; color: #666; line-height: 1.5; } .command { font-family: monospace; background: #f0f0f0; padding: 5px 10px; border-radius: 4px; display: inline-block; margin-top: 10px; } </style>

暂时无法访问

当前环境已经开启了安全入口登录

可在 SSH 终端输入以下命令来查看面板入口:

1pctl user-info

curl: (3) URL rejected: Bad hostname -H: Line | 2 | -H "1Panel-Token: XjFlNrH2SSQCOlIEK94T2ttLM50fAmLg" \ | ~~ | The term '-H' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. -H: Line | 3 | -H "1Panel-Timestamp: " | ~~ | The term '-H' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Steps to Reproduce

curl -X GET "http://192.168.0.8:26462/api/v1/dashboard/current"
-H "1Panel-Token: XjFlNrH2SSQCOlIEK94T2ttLM50fAmLg"
-H "1Panel-Timestamp: <current_unix_timestamp>"

The expected correct result

No response

Related log output

Additional Information

No response

Activity

  1. xiaoxiaozhoutop commented on Sep 10, 2025

    @xiaoxiaozhoutop
    Author

    Image这个无需密钥认证?

  2. locked and limited conversation to collaborators on Sep 10, 2025
  3. converted this issue into a discussion #10335 on Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions