Skip to content
Docs
Operation

Get Current User

GET/me
Fetch the profile of whoever's logged in. This is typically one of the first calls you make after login-it tells you who the user is and gives you their basic profile info like name and email. Useful for displaying "Welcome back, Sarah!" or checking that authentication worked before doing anything else.

When to use this

  • Showing user profile info in your app's header or sidebar
  • Verifying the user's identity after login
  • Personalising the experience based on who's logged in

Returns

User retrieved successfully

Errors

400
Bad Request - Invalid input
401
Unauthorized - Authentication required
403
Forbidden - Insufficient permissions
404
Not Found - Resource not found
500
Internal Server Error

Every error names its code and links to it. All error codes

Notes

Tip
Call this after login to confirm authentication succeeded and to get the user's details for your UI.

Related

import { BackstageClient } from '@ticketlayer/backstage';const client = new BackstageClient({  organisationSlug: 'your-org',});client.setAccessToken('YOUR_ACCESS_TOKEN');// Get the current authenticated userconst user = await client.users.getMe();console.log(`Hello, ${user.firstName} ${user.lastName}!`);console.log(`Email: ${user.email}`);console.log(`User ID: ${user.id}`);
Response 200
{
  "user": {
    "id": "usr_abc123",
    "email": "user@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "identityProvider": "stagedoor",
    "externalUserId": "stagedoor-user-123"
  }
}

Try it in test mode