Skip to content
Docs
Operation

Get My Roles

GET/me/roles
See what roles the current user has. Roles determine what a user can do-an "Event Manager" might be able to create events but not manage billing, while an "Admin" can do everything. This returns all the roles assigned to the current user, which you can use to show or hide features in your UI.

When to use this

  • Showing the user's role on their profile page
  • Deciding which navigation items to display
  • Checking if a user has admin access

Returns

Roles 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
For checking specific permissions, use `getMyPermissions` instead-it gives you the actual permission strings you can check against.

Related

import { BackstageClient } from '@ticketlayer/backstage';const client = new BackstageClient({  organisationSlug: 'your-org',});client.setAccessToken('YOUR_ACCESS_TOKEN');// Get myrole detailsconst myrole = await client.users.get('{{MYROLES_ID}}');console.log(`MyRoles: ${myrole.name || myrole.id}`);
Response 200
{
  "roles": [
    {
      "id": "rol_system_org_owner",
      "name": "Organisation Owner",
      "description": "Full administrative access to the organisation",
      "accountId": "acc_abc123",
      "isSystemRole": true
    }
  ],
  "isOrgAdmin": true
}

Try it in test mode