Skip to content
developers
Open TestCollab

Get user

GET/users/me

Get currently logged in user

Use resource IDs from your own project. Keep the API token in your server or CI environment.

example.ts
import { createConfiguration, UsersApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);
const api = new UsersApi(config);
const result = await api.getMyUser();
console.log(result);

200 — User

Field Type Required Description
id number Yes —
name string Yes —
about_me string No —
email string Yes If email is modified then a confirmation should be sent
avatar Upload No —
avatar.id number Yes —
avatar.name string Yes —
avatar.hash string Yes —
avatar.ext string Yes —
avatar.mime string Yes —
avatar.size string Yes —
avatar.url string Yes —
avatar.created_by number No —
avatar.created_at string Yes —
avatar.updated_at string Yes —
username string No —
last_active string No —
confirmed boolean No —
rank string No Values: User, Administrator.
projects Project User Minified Collection No —
projects[].id number Yes —
projects[].user number Yes —
projects[].project number Yes —
projects[].role number Yes —
projects[].created_at string Yes —
projects[].updated_at string Yes —
created_at string No —
is_guest number No —
Illustrative response
{
"id": 123,
"name": "example",
"about_me": "example",
"email": "example",
"avatar": {
"id": 123,
"name": "example",
"hash": "example",
"ext": "example",
"mime": "example",
"size": "example",
"url": "example",
"created_by": 123,
"created_at": "example"
},
"username": "example",
"last_active": "2026-10-19T09:00:00Z",
"confirmed": true,
"rank": "User"
}
Status Meaning
401 Unauthorized
403 Forbidden
404 Not found
500 Internal server error