GET /v1/me
Who am I. The token's person, its workspace and the role it is acting with. user.role is the lower of the person's role and the token's limit. A good first call to check a token.
curl -s "$SENTRABRIDGE_URL/v1/me" \
-H "Authorization: Bearer $SENTRABRIDGE_TOKEN"200 The person, the workspace and the role in use.
Example answer (application/json, real, shortened)
{
"auth": "local",
"user": {
"id": 3,
"name": "Alex Rivera",
"email": "[email protected]",
"platform_admin": false,
"must_change_password": false,
"role": "admin",
"mfa_enabled": false,
"mfa_setup_required": false,
"mfa_clerk_required": false,
"signed_in_with": "password",
"departments": null
},
"workspace": {
"id": "01m74hqe1m08znmjtembcq6sf7",
"name": "City of Demo",
"timezone": "America/Los_Angeles",
"status": "active",
"alert_emails": [],
"alert_on": "failed",
"status_page": true,
"slug": "city-of-demo",
"require_mfa": false,
"departments": [],
"ai_enabled": true,
"ai_records": false,
"ai_available": true
},
"workspaces": [
{
"id": "01m74hqe1m08znmjtembcq6sf7",
"name": "City of Demo",
"status": "active",
"role": "admin"
},
{
"id": "01m75mava07vbsmk78aa8vnyhm",
"name": "City of Demo (Test)",
"status": "active",
"role": "admin"
}
],
"version": "0.2.0"
}Errors
401The API token is missing, wrong, expired or revoked.