مرجع API · Auth & profile
Sign one device out
delete
/auth/sessions/{id}| احراز هویت | توکن مشتری (Bearer) |
|---|---|
| سطح دسترسی | کاربر رایگان · کاربر حرفهای Customer token (Bearer) — free and paid users |
| محدودیت نرخ | 20/1min |
Revokes one of the account's own sessions (an id from GET /auth/sessions); the current one too, which signs this device out. Throttle 20/min.
پارامترها
| نام | محل | نوع |
|---|---|---|
id* | path | integer |
پاسخها
204 — No content
401 — Missing/invalid token
| فیلد | نوع |
|---|---|
message* | string |
code | string |
json
{
"message": "Please sign in to continue; your session has ended or is not valid.",
"code": "unauthenticated"
}
404 — No such session on this account
| فیلد | نوع |
|---|---|
message* | string |
json
{
"message": ""
}
429 — Too many requests
| فیلد | نوع | توضیح |
|---|---|---|
message* | string | |
resend_in | integer | Seconds until a new login code may be requested (login-code cooldown only). |
json
{
"message": "Too Many Attempts.",
"resend_in": 0
}
نمونهٔ curl
bash
curl -X DELETE 'http://127.0.0.1:8010/api/auth/sessions/{id}' \
-H 'Accept: application/json' \
-H "Authorization: Bearer $RAWI_USER_TOKEN"