Chat Quota
Get daily chat quota for the current user or anonymous visitor.
获取当前用户或匿名用户的每日问答配额。
authenticated exists because the two branches below are otherwise indistinguishable to the caller, and that ambiguity shipped a user-visible lie. get_optional_user returns None for a missing token and for an expired or otherwise invalid one alike (see resolve_optional_user), so a logged-in reader whose 8-hour JWT had quietly expired fell through to the anonymous branch and was served limit: 10. The client still had the user object in its persisted store, so it rendered the logged-in low-quota warning around the anonymous number — a reader with 199 of 200 questions left was told 10 remained. The same expiry silently demotes them on /chat/stream too (IP-shared quota, session not saved to their account), which is the part worth surfacing.
With this flag the client can tell "you are a guest" from "your session expired" and say so, instead of inventing a quota.
Request
- Base URL: https://fojin.app (the document declares no server; this is the origin it was published from)
- URL: https://fojin.app/api/chat/quota
- Auth: HTTP bearer
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.