Me
GET /me tells you who a token belongs to and what it may do. Make it the first call of any integration or agent: it confirms the token works, shows which tenant it's for, and whether it can write.
The principal model
- Name
identifier- Type
- string
- Description
The principal's identifier: the e-mail address of a person, or
service-account:followed by the UUID of a service account.
- Name
type- Type
- string
- Description
userfor a personal access token,service-accountfor a service account token.
- Name
uuid- Type
- string
- Description
The UUID of the person's account or of the service account.
- Name
name- Type
- string
- Description
The person's full name, or the service account's name.
- Name
email- Type
- string
- Description
The person's e-mail address. Not present for service accounts.
- Name
roles- Type
- string[]
- Description
The roles that decide which endpoints the token can use. See Permissions.
- Name
scopes- Type
- string[]
- Description
The scopes of the token in use:
api:read, andapi:writefor a token that may write.
- Name
access- Type
- string
- Description
readorwrite: what the token can actually do, after the service account's access level is applied.
- Name
tenant- Type
- object
- Description
The tenant the token belongs to, with
slugandname. Only on installations that host several tenants.
/meRetrieve the principal
Returns the person or service account behind the token. Any valid token works, read-only or not. Tokens created with earlier versions of fepli, which only read offers, get a 403.
curl https://example.fepli.eu/api/me \
-H "Authorization: Bearer $FEPLI_TOKEN"
Response
{
"identifier": "service-account:0193b2d6-5c1e-7a48-9e0f-4d2a6b8c1e10",
"type": "service-account",
"uuid": "0193b2d6-5c1e-7a48-9e0f-4d2a6b8c1e10",
"name": "Auswertung",
"roles": ["ROLE_ADMIN", "ROLE_USER", "ROLE_SERVICE_ACCOUNT"],
"scopes": ["api:read"],
"access": "read",
"tenant": { "slug": "elmsbrueck", "name": "Ferienpass Elmsbrück" }
}