Skip to main content

Check current user information

Retrieve information about the currently authenticated user, including permissions and role.

Endpoint

GET /whoami

Authentication

HeaderValue
AuthorizationBearer <jwt_token>

Example Request

curl -X GET http://localhost:9000/whoami \
-H "Authorization: Bearer <jwt_token>"

Response

Success Response (200 OK)

Admin User Response

{
"id": "67ffc3f5a2120e73468ce66c",
"username": "admin",
"is_admin": true
}

Team User Response

{
"id": "6800be205e5d00c1c14fe244",
"username": "teamuser1",
"is_admin": false,
"owner": "admin",
"permissions": {
"Apps": {
"Create": true,
"Delete": false,
"Edit": false,
"Download": true,
"Upload": true,
"Allowed": [
"67fe34c804d701fb7f3cc656",
"67fe3669cebd0550e07763de"
]
},
"Channels": {
"Create": true,
"Delete": false,
"Edit": false,
"Allowed": [
"67f826fa5c0a2b68411b2111"
]
},
"Platforms": {
"Create": false,
"Delete": false,
"Edit": true,
"Allowed": [
"67f82615a27c60636bd57308"
]
},
"Archs": {
"Create": true,
"Delete": true,
"Edit": false,
"Allowed": [
"67f8261aa27c60636bd57309",
"67f827ac8ffe38b6de325c07"
]
}
}
}

Response Fields

Common Fields

FieldTypeDescription
idstringUnique identifier of the user
usernamestringUsername of the authenticated user
is_adminbooleanWhether the user has administrative privileges

Team User Additional Fields

FieldTypeDescription
ownerstringUsername of the admin who created this team user
permissionsobjectDetailed permissions for different resource types

Permission Object Fields

FieldTypeDescription
CreatebooleanPermission to create new resources
DeletebooleanPermission to delete resources
EditbooleanPermission to edit existing resources
DownloadbooleanPermission to download files
UploadbooleanPermission to upload files
AllowedarrayList of resource IDs the user has access to

Notes

  • Admin users have full access to all resources and operations
  • Team users have restricted access based on their assigned permissions
  • The Allowed array contains IDs of specific resources the user can access
  • Use this endpoint to determine user capabilities and access rights
  • Permissions are granular and can be customized per resource type