Authentication Overview
Choose credentials for the principal making the request. A bearer token identifies its owner; its storage format does not make a project, attendee, page, plugin or reader credential interchangeable.
| Caller | Credential | Intended use |
|---|---|---|
| Developer/project administrator | Admin session or supported admin integration credential | Actions allowed by team/project roles |
| Trusted server integration | Project-owned Sanctum token from Developer Hub API Keys | Project data APIs with granted model actions; verify endpoint scope enforcement |
| Guest visiting a public page | Public portal-page key | That page's permitted dependencies and audience; no attendee identity |
| Signed-in attendee | Portal session, or individual attendee bearer plus page key | Page-authorized attendee APIs supported by that endpoint |
| Build/release pipeline | Plugin API token with explicit plugin mappings | Supported plugin version, asset and publication APIs |
| Print-server device | Reader identifier/secret exchanged for a reader bearer | Allowed reader operations in its project |
| MCP client | Supported admin OAuth/credential connection | MCP tools allowed by the connected administrator's permissions |
Select the host and route
The API host registers /api/v1/... and /v1/.... The serving portal registers /api/v1/...; portal login handlers such as /auth/token are separate web routes. Use the environment's actual hostname and the endpoint's supported host. Quiz, survey and form-response page-context operations must use their serving portal; an API-host alias does not establish that context.
For a trusted project integration:
curl 'https://YOUR_API_HOST/api/v1/projects/TEAM_SLUG/PROJECT_SLUG/attendees' \
-H "Authorization: Bearer $GXP_API_TOKEN" \
-H 'Accept: application/json'
Add JSON content type for a JSON body. The credential variable must contain the entire issued bearer, not an access code, project slug or token ID alone. Do not copy a privileged project credential into browser code.
Identity and page context
A page-only key represents the page and can support guest access where its rules permit it. It cannot satisfy an attendee-only operation. For attendee bearer requests, send the individual token in Authorization and the page key separately in X-Portal-Page-Token. Browser plugins should use the GxP Store so the installed runtime supplies this context.
The API checks active pages, required login, same-project principals and audience rules. Portal-hosted calls also require a page belonging to the portal serving that hostname. Conflicting bearer/header page keys are rejected; adding a page key from another project cannot transfer its permissions. Widget keys do not independently authorize project resources.
Authentication does not establish ownership of every returned record. Project API Keys documents the current project-ownership, record and field enforcement limitations found in synthetic source checks. A hidden navigation item, valid token or successful list request is not a substitute for testing denied projects, records and fields.
Diagnose failures
| Result | Check |
|---|---|
| 401 | Complete credential, expiry, session and the endpoint's required principal; login-only page with no qualifying login |
| 403 | Denied action, wrong token type, disabled token-auth setting or inactive reader/plugin credential |
| 404 | Host, project/resource slug, portal/page binding, inactive page or denied audience; some inaccessible resources are deliberately hidden |
| 419 on a web login | Session/CSRF transport; do not assume web OTP routes are stateless API endpoints |
| 422 | Method ID, credential fields or request payload |
| 429 | Route-specific limit; honor retry guidance |
Use Portal token context, Reader Authentication, Plugin API Tokens, and MCP for the selected flow. The documentation quiz's stateless email OTP adapter is a prepared API change, with its own release gates.
Implementation evidence
Reviewed against experience-portal 04c7d10048 on 2026-10-13: RouteServiceProvider, Kernel, PortalApiConfig, ResolvePermissionContext, EnforcePermissionContext, PortalPageAccess, BaseDashboardPolicy, EnsurePluginApiToken and ReaderLoginController. Local contract evidence does not establish that every environment has deployed this snapshot.