Skip to main content
Version: v1 (Current)

Project API Keys

The Developer Hub's API Keys page issues project-owned Laravel Sanctum bearer tokens for server integrations. A key is issued on one project, has explicit abilities and expires. Configure the integration to use that project's routes; token ownership alone is not proof of every endpoint's isolation checks. Use it from a trusted server or automation, keeping the secret outside attendee app bundles.

Create a key​

  1. Open the selected team's Developer Hub → API Keys.
  2. Choose a project you can manage. Key management requires update_projects for that project.
  3. Enter a descriptive name.
  4. Add at least one model permission and choose its record scope. Full access is an explicit separate choice, not the default.
  5. Optionally select visible fields for supported resources.
  6. Select an expiry: 15, 30, 90, 180 or 365 days.
  7. Create the key and copy the secret when displayed. The platform reveals the new secret once; store it in your server's secret configuration.

The listing shows project, abilities, creation, last-use and expiry information. It does not reveal existing secrets. If you lose a secret, issue a replacement rather than trying to recover it from the listing.

Workspace visibility and scope pickers​

The team-wide workspace lists only projects for which the signed-in administrator passes manageApiTokens, backed by update_projects for that project's ID and team. Tokens belong to projects, so the table can include keys created by other administrators for those manageable projects. It is not a personal-key list. The default Developer role's project visibility alone does not grant key management. An administrator with no manageable project and no class-level project-update permission receives a denial; an empty list is not evidence the team has no keys.

At develop commit 25e1564 (reviewed 2026-10-19), this workspace receives the filtered dependency catalog also used by the app editors, instead of the raw API-route configuration. Unavailable entries/hidden permissions can therefore disappear from the offered choices. This is a catalog change, not proof that existing keys were migrated or that the record/field enforcement limitations below were repaired. App attendee-owned grants and their signed-in attendee context are a separate authorization path; do not infer those semantics for a project key from shared catalog metadata.

Changing Project clears the scoped abilities and turns off Full access. Rebuild the permission selection for the new project before creating a key. Full access requires its own confirmation and submits the standalone * ability. The default expiry is 90 days; the allowed choices above still apply.

The record picker returns at most 200 records from the selected model in the selected project, and only for models with a direct project_id column. A missing record in this picker does not prove it is absent from the platform. Models without that column return no record options. Tag options are empty when the project-tag table is unavailable. Fields come from the model's configured whitelist, or its table columns when no whitelist is configured; seeing an option does not prove its serializer enforces token field restrictions. Options are cached per project/model for this mounted workspace, so reload after changing the underlying records or configuration. Keep the enforcement limitations below in mind when choosing any scope.

The record search filters the returned options; this handler has no server search or pagination parameter and no explicit ordering guarantee. If a required record is outside that set, ask the platform maintainer to resolve picker coverage rather than assuming a search will fetch it or granting Full access as a workaround.

The permission card also converts a failed scope-options request into empty choices. Inspect the request's status in browser developer tools when emptiness is unexpected; distinguish a denied/failed request from a successful empty result before changing permissions.

The card titled Active tokens includes historical records too. Its Revoked badge means the expiry is in the past, including natural expiry; it does not establish that somebody explicitly revoked the key. Check the expiry and integration's recorded rotation/revocation history before diagnosing the cause.

The newly issued secret is shown in the creation response's destination page and cleared by a subsequent response. Copy it before navigating or refreshing. If the copy button cannot use the browser clipboard, select and copy the displayed value manually. If the secret is no longer available, create a replacement and use Revoke on the unused key; the listing cannot recover it.

Workspace routes and access checks​

These are authenticated dashboard-host Developer Hub routes, separate from the older per-project dashboard API-key routes and from bearer-authenticated API resource endpoints:

ActionMethod and path under /{team}/developerAdditional handler check
List manageable projects and their keysGET /api-keysFilters each project by manageApiTokens; denies the empty result unless class-level project update is allowed
Issue a keyPOST /api-keysResolves the numeric project_id through the team's projects and checks manageApiTokens; requires name, abilities and an allowed expiry
Load scope optionsGET /api-keys/projects/{project}/scope-options?key=MODEL_KEYUses the project's slug in the URL, checks its team and manageApiTokens
Revoke a keyDELETE /api-keys/{token}Resolves a project-owned token within the team's projects and checks its owning project's manageApiTokens

The route group requires an authenticated, verified account and team context. Issuance also has a throttle:10,60 route limiter. This is not a public API for creating credentials from attendee apps. A visible rail link does not guarantee access, and these issuance checks do not fix the separate bearer-token endpoint limitations below.

Authentication header​

Send the key as a bearer token and request JSON:

curl 'https://YOUR_API_HOST/api/v1/projects/TEAM_SLUG/PROJECT_SLUG/attendees' \
-H "Authorization: Bearer $GXP_API_TOKEN" \
-H 'Accept: application/json'

Replace the host and slugs with the actual environment and token's project. Use Content-Type: application/json for JSON bodies. This hub flow does not use an X-API-Key header or a gxp_live_ key-prefix contract.

Scoped abilities​

The builder serializes abilities in this form:

{api_route_key}:{scope}:{permissions}[:{visible_fields}]
SegmentMeaning
API route keySupported model key from the platform catalog, such as attendee
Scope* expresses all instances of the model, or comma-separated record IDs and #-prefixed tags; project ownership enforcement must be checked separately
PermissionsComma-separated supported action names
Visible fieldsOptional comma-separated readable attributes

For example:

attendee:*:view_attendees
attendee:42,43:view_attendees:id,uuid

The first expresses attendee viewing for all model instances. It does not independently bind a request to the token's owning project. The second expresses a grant for two records and selected fields. That syntax does not prove list or serializer enforcement; see the limitations below. Choose only field options supported by the selected resource and verify actual output. Tag scopes depend on the resource's project-tag support; test the selected model before relying on them.

attendee:*:view_attendees is narrower than the standalone * ability, which grants unrestricted access within the token authorization path. An omitted field selection imposes no additional token field restriction; it does not mean zero fields.

Authorization and legacy keys​

A valid token needs an ability covering the resource and requested action. The current base policy checks selected record IDs/tags for individual resource operations, but collection authorization has no individual target and records its intended constraints for later query handling.

Current record/field enforcement limit: the common attendee list/query and resource serializer do not consume the recorded project-token record/field constraints. An isolated synthetic check at source 04c7d10048 returned an excluded attendee in a list and retained its email field despite a selected-ID, id-only grant; the individual excluded-record policy check was denied. Do not use the builder's record or field selectors as a verified list/data-redaction boundary. A client query filter is also not an authorization boundary.

Current project-ownership enforcement limit: a second synthetic check found that the route-context middleware and base project-token policy allowed another project's context and attendee under a model-wide ability. The projects were disposable fixtures in the same team. This check exercised those source paths, not a full HTTP deployment. Do not rely on token ownership or client-selected project slugs as a verified isolation boundary; require a demonstrated server-side ownership check for the endpoint.

Use these keys only in trusted integrations permitted to receive the endpoint's actual output. Before relying on any scope, test list, search, individual reads, mutations, related resources, exports, fields and a different project. Require an API enforcement fix or proven endpoint-specific behavior when a negative check fails. This source finding was not reproduced against live project data.

Older keys carrying coarse read or write abilities retain a broad compatibility fallback in the current policy. Do not treat those labels as reliable read-only/write-only restrictions. Replace legacy keys with explicit scoped abilities and verify the replacement before retiring them.

Rotation and revocation​

Create a replacement with the intended abilities and expiry, update the integration, test it, then revoke the old key. Revocation sets its expiry to the current time and retains the record for history. An expired or revoked key no longer authenticates.

The current hub flow provides explicit issuance and revocation. It does not offer automatic rotation, IP allowlisting or a permanent non-expiring key option. Schedule your operational replacement process around the selected expiry.

Troubleshooting​

An authentication failure usually means a missing, invalid, expired or revoked token. A permission denial can mean a missing action or excluded record scope. A not-found response can also protect a resource outside the current project context. Verify the host, project slugs, bearer credential and requested resource before widening abilities.

For browser apps, use the platform store and page context described in Permissions and dependencies. Plugin-management API tokens and widget keys have different purposes and are not substitutes for these project keys.

If the scope picker fails, confirm the selected team, project and model key first. The selector stores a numeric project ID for creation but generates scope-option URLs with the project slug. An unsupported model key returns empty records/tags; it is not a reason to enable Full access. Validation failures require a name, at least one ability and an allowed expiry; repeated issuance can hit the route limiter. After an uncertain creation response, inspect the listing before retrying so you do not silently accumulate keys. Test rotation in a controlled integration: confirm the replacement's intended response and the old credential's refusal, plus an excluded record/project request. A failing exclusion check needs an enforcement fix rather than a broader token.

Use a distinct integration/rotation name so you can compare the project, name, creation time, abilities and expiry after an uncertain reply. If a matching key exists but its secret was lost, create a clearly named replacement and revoke that unused record. Do not guess between indistinguishable rows; reconcile them with the integration owner first. When testing field restrictions, explicitly require an excluded field to be absent from the actual response; a successful status alone is insufficient.

Implementation evidence​

Reviewed on 2026-10-13 against experience-portal 04c7d10048: Developer/ApiKeyController, ProjectPolicy::manageApiTokens, ProjectTokenAbility, BaseDashboardPolicy, the ApiKeys UI, OrionBaseApi, DataScopeService and AttendeeResource/FiltersPortalFields. The retained synthetic scope check is documented in the repository's authentication audit; deployed acceptance remains required.

Workspace navigation, the four route handlers, scope-option discovery, one-response secret display and expiry presentation were rechecked on 2026-10-15 against 3b48eb675f7c8e3c4f0b87d0cd613fa7fb371093. This bounded refresh does not rerun the earlier API isolation probes or certify live endpoint enforcement.