POST
v1.1.0stableUpdate Token
Generate a new API token and invalidate the old token immediately.
POST
/api/token/updateAuth:API Key
Limite:30/minute
Richiesta parametri
Tutti i parametri possono essere passati tramite Query o Body
| Parametro | Tipo | Obbligo | Descrizione |
|---|---|---|---|
token | string | Obbligo | Current API token. It becomes invalid immediately after success Esempio: your_api_token_here |
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.token | string | Obbligo | New API token Esempio: new_api_token_here |
data.expire_time | number | Obbligo | Expiry timestamp inherited by the new token. 0 means permanent Esempio: 1772267945 |
data.old_token_invalidated | boolean | Obbligo | Whether the old token has been invalidated Esempio: true |
Esempio di risposta
{}
"code":1,
"msg":"Refreshed successfully",
"time":1769675945,
"data":
{}
,"username":"testuser",
"token":"new_api_token_here",
"expire_time":1772267945,
"old_token_invalidated":true
"ysucc":"Ysucc"
Codici di errore
Codici di errore3 definito
0Token is required
Missing token parameter
0Invalid token
Token is invalid, replaced, or the account status is unavailable
0Token expired
Expired tokens cannot update tokens
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/update" \
-H "X-Lang: it" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "token=your_api_token_here"Note
- 调用成功后,旧 token 会立即失效,后续请求必须使用响应中的新 token
- 新 token 会继承原 token 的有效期配置
- 接口成功后会清除旧 token 缓存,避免旧 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/updateBloccato a questo sitostringObbligo
Current API token. It becomes invalid immediately after success