# pub.chive.actor.getMyRoles

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.actor.getMyRoles)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.actor.getMyRoles/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.actor.getMyRoles/examples)

## Definitions

### `pub.chive.actor.getMyRoles`

**Type**: `query`

Get the authenticated user's roles and access flags

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `roles` | `array` | Yes | List of role identifiers assigned to the user |
| `isAdmin` | `boolean` | Yes | Whether the user has admin privileges |
| `isPremium` | `boolean` | Yes | Whether the user has premium access |
| `isAlphaTester` | `boolean` | Yes | Whether the user has alpha tester access |

#### Errors

- **AuthenticationRequired**

## Raw Schema

```json
{
  "id": "pub.chive.actor.getMyRoles",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "AuthenticationRequired"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "roles",
            "isAdmin",
            "isAlphaTester",
            "isPremium"
          ],
          "properties": {
            "roles": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "List of role identifiers assigned to the user"
            },
            "isAdmin": {
              "type": "boolean",
              "description": "Whether the user has admin privileges"
            },
            "isPremium": {
              "type": "boolean",
              "description": "Whether the user has premium access"
            },
            "isAlphaTester": {
              "type": "boolean",
              "description": "Whether the user has alpha tester access"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {}
      },
      "description": "Get the authenticated user's roles and access flags"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
