GET
v1.0.0stable

Query Token Expiry

Retrieve the expiry time and validity status of an API token

GET/api/token/expire
Auth:API Key
Granica:120/minute

Parametry żądania

Wszystkie parametry mogą być przekazywane za pośrednictwem zapytania lub ciała

ParametrRodzajWymaganeOpis
token
stringWymagane
User API token
Przykład: your_api_token_here

Odpowiedź

ParametrRodzajWymaganeOpis
code
numberWymagane
Status code: 1=success, 0=failure
Przykład: 1
msg
stringWymagane
Response message
Przykład: 查询成功
time
numberWymagane
Server timestamp (Unix seconds)
Przykład: 1769675945
data
objectWymagane
Response payload
data.username
stringWymagane
Username
Przykład: testuser
data.expire_time
numberWymagane
Expiry timestamp (Unix seconds). 0 means permanent
Przykład: 1769675945
data.status
stringWymagane
Status: permanent, valid, or expired
Przykład: valid
data.status_text
stringWymagane
Status text
Przykład: 有效
data.is_valid
booleanWymagane
Whether the token is valid
Przykład: true
data.remaining_seconds
numberWymagane
Remaining seconds (-1 means permanent)
Przykład: 2592000
data.remaining_days
numberWymagane
Remaining days (-1 means permanent)
Przykład: 30
data.expire_time_formatted
stringWymagane
Formatted expiry time (not returned if permanent)
Przykład: 2026-02-28 15:04:05
ysucc
stringWymagane
Success flag, returns "Ysucc" on success
Przykład: Ysucc
Przykład odpowiedzi
{
"code":1,
"msg":"Query successful",
"time":1769675945,
"data":
{
"username":"testuser",
"expire_time":1772267945,
"status":"valid",
"status_text":"有效",
"is_valid":true,
"remaining_seconds":2592000,
"remaining_days":30,
"expire_time_formatted":"2026-02-28 15:04:05"
}
,
"ysucc":"Ysucc"
}

Permanent Token

Returns permanent when the token has no expiry set

Permanent Token
{
"code":1,
"msg":"Query successful",
"time":1769675945,
"data":
{
"username":"testuser",
"expire_time":0,
"status":"permanent",
"status_text":"永久有效",
"is_valid":true,
"remaining_seconds":-1,
"remaining_days":-1
}
,
"ysucc":"Ysucc"
}

Expired Token

Token has exceeded its expiry time

Expired Token
{
"code":1,
"msg":"Query successful",
"time":1769675945,
"data":
{
"username":"testuser",
"expire_time":1769000000,
"status":"expired",
"status_text":"已过期",
"is_valid":false,
"expired_seconds":675945,
"expired_days":7,
"expire_time_formatted":"2026-01-21 12:26:40"
}
,
"ysucc":"Ysucc"
}

Kod błędu

Kod błędu3 zdefiniowane
0
Token is required
Token parameter is missing
0
Invalid token
Invalid token or has been replaced
0
Only GET requests are supported
Used non-GET method

Język odpowiedzi

Dostosuj język odpowiedzi API do nagłówka X- Lang. Poniższe przykłady kodów automatycznie korzystają z aktualnego języka strony.

Zalecany nagłówek
X-Lang: pl
Obsługiwane języki
zh, en, zh-TW, vi, ar, es, ru

Obsługiwane jest również Accept- Language; X- Lang ma pierwszeństwo. Nieobsługiwane języki podążają za zapasami języka strony.

Przykłady kodów

curl -X GET "https://testypro.iwai.cc,https://cer.xyul.cn,https://cer.iwai.cc/api/token/expire?token=your_api_token_here" \
  -H "X-Lang: pl"

Uwagi

  • expire_time 为 0 时表示 Token 永久有效
  • remaining_seconds/remaining_days 为 -1 时表示永久有效
  • 已过期的 Token 仍可查询有效期,但 is_valid 为 false
  • 已被替换的 Token 无法查询,会返回 token 不正确

Spróbuj w konsoli

Wypełnij poniższe parametry i wyślij wniosek o przetestowanie. Żądania są kierowane tylko do API tej witryny; adres URL jest zablokowany i nie może być zmieniony, a obecne pliki cookie logowania są włączone.

GEThttps://testypro.iwai.cc/api/token/expire?token=your_api_token_hereZamknięte na tej stronie
stringWymagane

User API token