GET) require no authentication. All write endpoints (PUT, DELETE) and the business card push endpoint (POST) require authentication.
Two authentication methods are supported.
Bearer token (recommended)
Available since phoss SMP v6.0.7. Tokens are created in the management UI under Administration > Security > User Tokens. Pass the token in theAuthorization request header:
Creating a token
curl example
HTTP Basic Auth (legacy)
Uses the SMP user’s email address and password encoded as Base64.curl example
Use the-u flag with email:password:
curl automatically Base64-encodes the credentials when you use the
-u flag.Which endpoints require authentication
| Method | Path | Auth required |
|---|---|---|
GET | /{ServiceGroupId} | No |
PUT | /{ServiceGroupId} | Yes |
DELETE | /{ServiceGroupId} | Yes |
GET | /{ServiceGroupId}/services/{DocumentTypeId} | No |
PUT | /{ServiceGroupId}/services/{DocumentTypeId} | Yes |
DELETE | /{ServiceGroupId}/services/{DocumentTypeId} | Yes |
GET | /businesscard/{ServiceGroupId} | No |
PUT | /businesscard/{ServiceGroupId} | Yes |
DELETE | /businesscard/{ServiceGroupId} | Yes |
POST | /businesscard/{ServiceGroupId}/push | Yes |
GET | /smp-status/ | No |
GET | /ping/ | No |
Ownership
Even with valid credentials, a user can only modify service groups they own. Attempting to write to a service group owned by a different user returns403 Forbidden.
Error responses
Missing or invalid credentialsSecurity recommendations
- Prefer Bearer tokens over Basic Auth. Tokens can be revoked without changing your account password.
- Use HTTPS in production. Credentials sent over plain HTTP are visible in transit.
- Set
webapp.security.login.errordetails = falsein production to prevent the server from revealing whether an email address exists.