当前为2.0版本。官方API后端仅供内部使用!
©2026 P.C.T.G All Rights Reserved.
Authorization: Bearer ********************{
"tokens": [
{
"raw": "another-test-token",
"valid_until": "2026-12-31 23:59:59",
"whitelist_ips": [
"10.0.0.0/8",
"192.168.1.10"
]
},
{
"raw": "test-token"
}
]
}curl --location 'http://127.0.0.1:8000/api/admin/tokens/add' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"tokens": [
{
"raw": "another-test-token",
"valid_until": "2026-12-31 23:59:59",
"whitelist_ips": [
"10.0.0.0/8",
"192.168.1.10"
]
},
{
"raw": "test-token"
}
]
}'{
"code": 200,
"status": "success",
"created": [
{
"raw": "another-test-toke",
"id": 1,
"sha256": "1ea7482021bed2c5eac72197c80acdf03ac383e97ba94b66fc813258cb628f8f"
},
{
"raw": "test-toke",
"id": 2,
"sha256": "8182e235d6707c69ba9e2a93b5ec9f927ee59def29ef9c3eec4b8d9a0df3df9a"
}
]
}