Plugin API Tokens for CI
Plugin API tokens authorize supported plugin-management endpoints, including external-app version/assets and publication. They are distinct from project API keys, admin OAuth/MCP connections and attendee page credentials. Choose a plugin token when a build pipeline needs access to a particular supported plugin.
Create and store a token
- Sign in to the owning team with
manage_plugin_api_tokensand the relevant plugin-management authority. - Open the dashboard's Developer → Plugin API Tokens surface where exposed. The modern Developer Hub's API Keys page issues project keys; it is not this plugin-token screen.
- Create a named token, add a description identifying the pipeline and select an expiry. Creation defaults to three months when expiry is omitted.
- Copy the complete Bearer Token from the one-time result. Closing the result removes access to that displayed secret.
- Store it in the pipeline's protected secret configuration. Do not add it to Git, app source, generated artifacts or log output.
- Open the token and confirm Token is Active, expiry and its intended Plugin Access mappings before using it.
If the navigation is unavailable, have a team administrator check the management permission and supported dashboard surface. Creating a similarly named project key does not grant plugin access.
Map plugin access
In Plugin Access, add the intended plugin through the offered selector and choose Read, Write, or both. The backing model supports page, theme, widget, tile and external-app plugin mappings, while the deployed endpoint catalog determines which management operations exist for each type.
A mapping identifies the plugin type and ID. A read mapping for one external app does not permit publishing another. Read and write are independently checked; include Read if the pipeline needs to inspect the result after a write. A token with no applicable mapping cannot access the intended plugin merely because it is active.
The platform validates permitted plugin mappings and token-team context. Public discoverability is not permission to attach arbitrary write access. Have the owner/admin grant only the mappings needed for the pipeline.
Use the supported API
Use the deployment's API host and the REST API reference/API Catalog. External-app management uses /api/v1/plugins/external-apps/{appSlug}/versions/...; the resource version key is the platform version number. Public updater paths are a separate route family and require no management secret.
curl 'https://YOUR_API_HOST/api/v1/plugins/external-apps/APP_SLUG/versions' \
-H "Authorization: Bearer $GXP_PLUGIN_API_TOKEN" \
-H 'Accept: application/json'
The secret variable must hold the issued plugin bearer token. Use JSON content type for JSON mutations and the endpoint's documented multipart/upload contract for files. Do not print the variable while diagnosing the pipeline.
Test a read on an explicitly mapped test app, a write where granted and denial on an unmapped app. After publication, inspect the intended version, assets and default pointer. A queued upload or successful HTTP request alone does not prove the client will receive a valid release. See External Applications and Distribution.
The current management route group defaults to 60 requests/minute, with stricter publication/upload limits. Honor the returned retry guidance, and inspect whether a mutation completed before retrying it.
Replace or retire a credential
Create a replacement token with the intended mappings and expiry, update the pipeline secret, verify controlled API access and then deactivate/remove the old token through the authorized controls. A token's description or expiry edit does not display or regenerate its existing bearer secret.
Use Last Used and Usage to investigate whether the expected pipeline is still using a token. Deactivation or expiry makes the plugin token invalid. Keep a record of which pipeline owns each credential so an expiry does not interrupt an unexplained release process.
Troubleshooting
| Response/problem | Check |
|---|---|
| 401 | Complete bearer token, header, correct API host and existing credential |
| Wrong token type / 403 | PluginApiToken principal rather than a project/admin/attendee credential |
| Inactive or expired | Token active state and expiry; replace through the supported flow |
| Read/write denied | Exact plugin type/ID and its independently granted Read/Write mappings |
| Version/asset not found | Correct app slug, platform version key and parent-child relationship |
| 429 | Endpoint's limit and retry guidance; inspect prior mutation state |
| Secret lost | Issue a replacement; the one-time secret cannot be read again from the details page |
Implementation reference
Reviewed against app/Http/Controllers/Admin/Plugins/PluginApiTokenController.php, PluginApiTokenMappingController.php, app/Models/PluginApiToken.php, PluginApiTokenPlugin.php, app/Http/Middleware/EnsurePluginApiToken.php, app/Policies/PluginExternalAppVersionApiPolicy.php, the ApiTokens dashboard pages and routes/api/v1/routes.php at experience-portal commit 0cab696769c165d93328253378ad7e51ec7ab62e on 2026-10-13. Source presence does not guarantee every plugin type has a deployed management endpoint.