Rawi

مرجع 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*pathinteger

پاسخ‌ها

204 — No content

401 — Missing/invalid token

فیلدنوع
message*string
codestring
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_inintegerSeconds 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"

امتحان در کنسول