Catalog

Resolve the current bearer token to its server-authoritative principal and role.

validateToken target: 401 token_revoked for a revoked API key; 401 token_invalid for an unknown or malformed credential. Absence of credentials stays anonymous 200.

Inputs. No path or query fields are required. No request body is required.

Outputs. See each status below for its media type, schema and headers. A missing record or unavailable capability is not a successful empty result.

Errors. API JSON failures use the documented response schema. Read code, message and next; retry only when the response allows it. Auth, invalid input and missing records need a caller change.

Rate limits. Public read budgets apply by client IP and route group. This operation can have a smaller route-specific budget. Read Retry-After on 429 or retryable 503 responses.

Example setup. Set HUGGING_BAY_TOKEN to a credential with the role or scope stated by this operation. Reader tokens do not grant publisher or operator rights.

get/api/me

Request

  • Base URL: https://huggingbay.xyz
  • URL: https://huggingbay.xyz/api/me
  • Auth: HTTP bearer

Response

Current principal. No Authorization header returns the anonymous visitor (200). A supplied invalid or revoked Bearer returns 401.

idstring required
role'visitor' | 'reader' | 'publisher' | 'admin' required
allowedOwnersstring[] required

Changes

No recorded changes to this operation across all 1 revision of this API.