# social.colibri.beta.bridge.getMember

> Gets an account's standing in a community for the bridge that holds the registration: whether it is a member, whether it owns the community, its roles and its effective permissions. Bridges use it to decide who may run their commands.

- Kind: query
- Authority: bridge.beta.colibri.social
- Lexicon: 1
- Published by [colibri.social](https://lexicon.garden/identity/did:plc:mprdjqjluoswa7awzggaggj3), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.bridge.getMember)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.bridge.getMember/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.bridge.getMember/analytics)

## Query (`social.colibri.beta.bridge.getMember`)

Type: query · GET

### Parameters (query string)

- `channel` (string): A linked or open channel of the registration. When given, permissions include that channel's overrides.
- `community` (string · did, required): The community the registration belongs to.
- `did` (string · did, required): The account to look up.
- `registration` (string · tid, required): Record key of the registration.

### Output (application/json)

- `did` (string · did, required): The account.
- `member` (boolean, required): Whether the account is an admitted member that is not banned.
- `owner` (boolean, required): Whether the account owns the community.
- `permissions` (array, required): Effective permissions, in the community or in the given channel. Empty when the account is not a member.
  - `items` (string): A permission identifier.
- `roles` (array, required): Roles held, highest first. Empty when the account is not a member.
  - `items` (ref)
    - Reference: `#memberRole`

### Errors

- `AuthRequired`: The request is missing, malformed, or unverifiable service auth.
- `Forbidden`: The caller is not the bridge this registration belongs to.
- `CommunityNotFound`: No community exists at the given DID.
- `RegistrationNotFound`: The community has no bridge registration with that id.
- `ChannelNotLinked`: The channel is neither linked nor open to the registration.
- `RateLimited`: The bridge sent too many requests. Retry after the interval in the response headers.

## #memberRole (`social.colibri.beta.bridge.getMember#memberRole`)

Type: object

A role an account holds.

### Properties

- `name` (string, required): Display name.
- `position` (integer, required): Hierarchy position. Higher outranks lower.
- `rkey` (string · record-key, required): The role's record key.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Gets an account's standing in a community for the bridge that holds the registration: whether it is a member, whether it owns the community, its roles and its effective permissions. Bridges use it to decide who may run their commands.",
      "errors": [
        {
          "description": "The request is missing, malformed, or unverifiable service auth.",
          "name": "AuthRequired"
        },
        {
          "description": "The caller is not the bridge this registration belongs to.",
          "name": "Forbidden"
        },
        {
          "description": "No community exists at the given DID.",
          "name": "CommunityNotFound"
        },
        {
          "description": "The community has no bridge registration with that id.",
          "name": "RegistrationNotFound"
        },
        {
          "description": "The channel is neither linked nor open to the registration.",
          "name": "ChannelNotLinked"
        },
        {
          "description": "The bridge sent too many requests. Retry after the interval in the response headers.",
          "name": "RateLimited"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "did": {
              "description": "The account.",
              "format": "did",
              "type": "string"
            },
            "member": {
              "description": "Whether the account is an admitted member that is not banned.",
              "type": "boolean"
            },
            "owner": {
              "description": "Whether the account owns the community.",
              "type": "boolean"
            },
            "permissions": {
              "description": "Effective permissions, in the community or in the given channel. Empty when the account is not a member.",
              "items": {
                "description": "A permission identifier.",
                "type": "string"
              },
              "type": "array"
            },
            "roles": {
              "description": "Roles held, highest first. Empty when the account is not a member.",
              "items": {
                "ref": "#memberRole",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "did",
            "member",
            "owner",
            "roles",
            "permissions"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "channel": {
            "description": "A linked or open channel of the registration. When given, permissions include that channel's overrides.",
            "type": "string"
          },
          "community": {
            "description": "The community the registration belongs to.",
            "format": "did",
            "type": "string"
          },
          "did": {
            "description": "The account to look up.",
            "format": "did",
            "type": "string"
          },
          "registration": {
            "description": "Record key of the registration.",
            "format": "tid",
            "type": "string"
          }
        },
        "required": [
          "community",
          "registration",
          "did"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "memberRole": {
      "description": "A role an account holds.",
      "properties": {
        "name": {
          "description": "Display name.",
          "type": "string"
        },
        "position": {
          "description": "Hierarchy position. Higher outranks lower.",
          "type": "integer"
        },
        "rkey": {
          "description": "The role's record key.",
          "format": "record-key",
          "type": "string"
        }
      },
      "required": [
        "rkey",
        "name",
        "position"
      ],
      "type": "object"
    }
  },
  "id": "social.colibri.beta.bridge.getMember",
  "lexicon": 1
}
```
