POST
v1.1.0stableUpdate Token Expiry
Update the expiry timestamp of the current API token. Set expire_time to 0 to make it permanent.
POST
/api/token/expireAuth:API Key
Limite:60/minute
Richiesta parametri
Tutti i parametri possono essere passati tramite Query o Body
| Parametro | Tipo | Obbligo | Descrizione |
|---|---|---|---|
token | string | Obbligo | Current API token Esempio: your_api_token_here |
expire_time | number | Obbligo | New expiry timestamp in Unix seconds or milliseconds. Use 0 for permanent Esempio: 1772267945 |
Risposta
| Parametro | Tipo | Obbligo | Descrizione |
|---|---|---|---|
code | number | Obbligo | Status code: 1=success, 0=failure Esempio: 1 |
msg | string | Obbligo | Response message Esempio: 设置已保存 |
data.username | string | Obbligo | Username Esempio: testuser |
data.expire_time | number | Obbligo | New expiry timestamp. 0 means permanent Esempio: 1772267945 |
data.status | string | Obbligo | Status: permanent or valid Esempio: valid |
data.is_valid | boolean | Obbligo | Whether the token is valid Esempio: true |
data.remaining_seconds | number | Obbligo | Remaining seconds, -1 when permanent Esempio: 2592000 |
Esempio di risposta
{}
"code":1,
"msg":"Settings saved",
"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"
Codici di errore
Codici di errore3 definito
0Token is required
Missing token parameter
0Expiration time is required
Missing or invalid expire_time
0Expiration time must be in the future
expire_time is not 0 and is earlier than current time
Lingua di risposta
Personalizza il linguaggio di risposta API con l'intestazione X-Lang. Gli esempi di codice qui sotto utilizzano automaticamente la lingua del tuo sito corrente.
Intestazione consigliata
X-Lang: itLingue supportate
zh, en, zh-TW, vi, ar, es, ruAccetta-Language è anche supportato; X-Lang prende la priorità.
Esempi di codice
curl -X POST "https://testypro.iwai.cc,https://cer.xyul.cn,https://cer.iwai.cc/api/token/expire" \
-H "X-Lang: it" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "token=your_api_token_here&expire_time=1772267945"Note
- 该接口会校验当前 token 是否有效,已过期 token 不能用于修改有效期
- expire_time 支持秒级或毫秒级时间戳,传 0 可设置为永久有效
- 修改成功后会清除旧 token 缓存,后续请求立即按新有效期校验
Provalo in Console
Compila i parametri qui sotto e invia una richiesta al test. Le richieste vanno solo all'API di questo sito; l'URL è bloccato e non può essere modificato e il cookie di login corrente è incluso.
POST
https://testypro.iwai.cc/api/token/expireBloccato a questo sitostringObbligo
Current API token
numberObbligo
New expiry timestamp in Unix seconds or milliseconds. Use 0 for permanent