Fix tokens management doc: token-id revoke API + 50 admin notifications - #2764
Open
Pierrci wants to merge 5 commits into
Open
Fix tokens management doc: token-id revoke API + 50 admin notifications#2764Pierrci wants to merge 5 commits into
Pierrci wants to merge 5 commits into
Conversation
…ions Two sections drifted from the code: - The org revoke API now takes a token id (POST .../settings/tokens/:tokenId/revoke) instead of the raw token value in the body; the raw-value endpoint was removed in huggingface-internal/moon-landing#19474. Also: self-revoke now means "the token used for auth", stated as a 403. - Pending-token notifications go to up to 50 admins, not 5 (huggingface-internal/moon-landing#19496). Generated with Claude Code (GLM 5.3 Flash), agent acting for @Pierrci
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Add a "Listing Tokens via API" section: GET /api/organizations/:name/settings/tokens (auth, response fields, Link-header pagination, q filter with status:all), matching GET /api/organizations/:name/settings/tokens in moon-landing. Generated with Claude Code (GLM 5.3 Flash), agent acting for @Pierrci
Generated with Claude Code (GLM 5.3 Flash), agent acting for @Pierrci
Pierrci
marked this pull request as ready for review
September 4, 2026 20:01
Pierrci
requested review from
Charlie-Boyer,
Muhammadsaeed707 and
alexpouliquen
September 4, 2026 20:01
Listing is a standalone feature; it was nested under Revoking Tokens. Generated with Claude Code (GLM 5.3 Flash), agent acting for @Pierrci
Page-top warning already covers the feature; per-section warnings only mark the Enterprise-only pieces (revocation). Generated with Claude Code (GLM 5.3 Flash), agent acting for @Pierrci
alexpouliquen
approved these changes
Sep 8, 2026
Charlie-Boyer
approved these changes
Sep 8, 2026
Muhammadsaeed707
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sections of
enterprise-tokens-managementdrifted from the code:POST /api/organizations/:name/settings/tokens/:tokenId/revoke); the raw-token-value endpoint (POST .../settings/tokens/revokewith{"token": ...}) was removed in huggingface-internal/moon-landing#19474. Updated the curl example and the self-revoke note (now a 403 when the id matches the token used for auth).GET /api/organizations/:name/settings/tokens(curl example, OpenAPI link for the schema,status:allvs revoked-hidden default). The endpoint existed in the code but was undocumented.Everything else on the page was verified against the codebase and is accurate.
Note
Generated with Claude Code (GLM 5.3 Flash), agent acting for @Pierrci.
Note
Low Risk
Documentation-only updates to enterprise token management; no application code or runtime behavior changes.
Overview
Updates enterprise tokens management docs so they match current Hub behavior.
Pending-token emails now say up to 50 org admins are notified (was 5).
Adds Listing Tokens via API:
GET /api/organizations/{name}/settings/tokens, with a curl example, OpenAPI link, andq=status:allto mirror the UI’s revoked-token toggle.Revoking via API is rewritten for the token-id route
POST .../settings/tokens/{TOKEN_ID}/revokeinstead of posting the raw token to.../tokens/revoke. The self-revoke case is documented as a 403 when the id matches the bearer token; the shell-history tip for raw tokens is removed.Reviewed by Cursor Bugbot for commit 99b328e. Bugbot is set up for automated code reviews on this repo. Configure here.