Authentication
Every request needs a Bearer token in the Authorization header:
Authorization: Bearer nxp_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8
Tokens start with nxp_ followed by 48 lowercase hex characters. There is no other auth scheme.
Getting a Token
Create one from the panel at API Tokens. The token is shown once at creation and cannot be retrieved later. See API Tokens for the full workflow, expiry options, and scopes.
No Scope Required
A few endpoints work with any valid token, no scope needed:
GET /api/v1/versionGET /api/v1/me
Use them to check that a token works.
Authentication Failures
| Situation | Status | Code |
|---|---|---|
No Authorization header |
401 |
unauthorized |
| Header is not a Bearer token | 401 |
unauthorized |
| Token does not exist | 401 |
unauthorized |
| Token has been revoked | 401 |
unauthorized |
| Token has expired | 401 |
unauthorized |
| Token lacks a required scope | 403 |
insufficient_scope |
If you get a 401, check the token was copied correctly, has not expired, and has not been revoked in the panel.
A 403 means the token is valid but not allowed to do what was requested. The code field tells you which: insufficient_scope for missing scopes, forbidden for resources owned by another user.
Related
- API Tokens - create and manage tokens
- Errors - full error reference