Skip to content

Admin tokens#2992

Open
pwizla wants to merge 29 commits intomainfrom
cms/admin-api-tokens
Open

Admin tokens#2992
pwizla wants to merge 29 commits intomainfrom
cms/admin-api-tokens

Conversation

@pwizla
Copy link
Copy Markdown
Collaborator

@pwizla pwizla commented Mar 11, 2026

To document the new Admin tokens (strapi/strapi PR #25657) that will serve as a preliminary work for the upcoming Strapi MCP, this PR updates the CMS documentation with the following changes:

  • creates a new Features > Admin tokens page which is similar to the existing Features > API tokens page,
  • slightly updates the API tokens, Configurations > Admin Panel, and Features > RBAC page accordingly

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
documentation Ready Ready Preview, Comment Apr 17, 2026 8:56am

Request Review

@pwizla pwizla changed the title Cms/admin api tokens Admin API tokens Mar 11, 2026
@github-actions github-actions Bot added pr: updated content PRs updating existing documentation content source: CMS internal PRs created by the Strapi core team labels Mar 11, 2026
@pwizla pwizla marked this pull request as ready for review March 12, 2026 10:56
@pwizla pwizla requested a review from nclsndr March 12, 2026 13:12
@pwizla pwizla added pr: new content PRs for new product features or new documentation sections and removed pr: updated content PRs updating existing documentation content labels Mar 12, 2026
@pwizla pwizla added this to the 6.18.1 milestone Mar 12, 2026
@pwizla pwizla changed the title Admin API tokens Admin tokens Mar 12, 2026
@pwizla pwizla self-assigned this Mar 12, 2026
@pwizla pwizla added the flag: merge pending release Pending Strapi Release label Mar 12, 2026
@pwizla pwizla modified the milestones: 6.19.0, 6.20.0 Mar 18, 2026
@pwizla pwizla removed this from the 6.19.0 milestone Apr 1, 2026
Copy link
Copy Markdown
Contributor

@nclsndr nclsndr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much @pwizla for all this great content (and/or the steering to make it happen!)
Here my 2 cents 👇

Comment thread docusaurus/docs/cms/configurations/admin-panel.md
Comment thread docusaurus/docs/cms/features/admin-tokens.md Outdated
Comment thread docusaurus/docs/cms/features/admin-tokens.md
Comment thread docusaurus/docs/cms/features/admin-tokens.md Outdated
Comment thread docusaurus/docs/cms/features/admin-tokens.md
Comment thread docusaurus/docs/cms/features/admin-tokens.md Outdated
:::caution Owner account deactivation and deletion

* If the token owner's account is deleted, all Admin tokens owned by that user are automatically deleted along with their associated permissions. There is no recovery path. Rotate and replace Admin tokens before offboarding a team member who owns them.
* If the token owner's account is deactivated or blocked, any request authenticated with that owner's Admin token returns `401 Token owner is deactivated`. The token itself is not deleted. Re-activating or unblocking the owner restores token functionality.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we disclose such detailed error. May be a good addition.

Comment on lines +113 to +125
## Usage

Admin tokens authenticate requests to Strapi Admin API. Once you have [created and copied an Admin token](#creating-a-new-admin-token), add it to the `Authorization` header of your request using `Bearer` syntax:

```bash title="Example: authenticated Admin API request"
curl -X GET \
https://your-strapi-instance.com/admin/content-manager/collection-types/api::article.article \
-H "Authorization: Bearer your-admin-token"
```

:::caution
Never expose Admin tokens in client-side code. Store them in a secrets manager or environment variable.
::: No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to remove this section

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Nico, thanks for the feedback! For structure parity with other features pages, I need a Usage section (what's a feature if you can't use it or don't know how to use it, right? 😅 )

But considering we might not want to disclose any admin route for now since the API is not public yet, I updated this section with a much more generic usage definition. WDYT?
Screenshot 2026-04-17 at 10 36 14

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's something a bit strange with the admin tokens feature because they are actually opening the access to the admin api while the admin API is not a public API just yet. I don't know how we should present that aspect, especially until we release the MCP server where the admin tokens will make total sense with it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll change a bit the copy on that page. I don't know how important that will be for those screenshots.

- Update IdentityCard: Super Admin default, explicit grant for other roles
- Rename button to "Create new Admin Token"
- Clarify token storage (same table, kind discriminator)
- Allow any authorized user to view tokens
- Remove specific error message disclosure
- Scope Usage section to Bearer pattern + MCP server context
- Add FeatureFlagBadge with TODO placeholder
- Add admin tokens row to features configuration table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pwizla and others added 2 commits April 16, 2026 19:02
Remove curl example and Admin API reference since the Admin API
is not yet public. Keep the section for template consistency,
following the same structure as the API tokens page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The page does not exist yet.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flag: merge pending release Pending Strapi Release internal PRs created by the Strapi core team pr: new content PRs for new product features or new documentation sections source: CMS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants