HuggingfaceClient.Hub.Auth (huggingface_client v0.1.0)

Copy Markdown View Source

Authentication and user info (/api/whoami-v2).

Summary

Functions

Returns the authenticated user/org/app info.

Functions

who_am_i(opts)

@spec who_am_i(keyword()) :: {:ok, map()} | {:error, Exception.t()}

Returns the authenticated user/org/app info.

Example

{:ok, info} = HuggingfaceClient.Hub.Auth.who_am_i(access_token: "hf_...")
# info["type"] => "user" | "org" | "app"