# Logins

## List bridge logins

**get** `/v1/bridges/{bridgeID}/logins`

List bridge logins. A bridge login is a signed-in identity for a bridge and can contain one or more chat accounts.

### Path Parameters

- `bridgeID: string`

  Bridge ID.

### Returns

- `items: array of BridgeLogin`

  - `bridgeID: string`

    Bridge ID.

  - `loginID: string`

    Bridge login ID.

  - `removeScopes: array of "current-device" or "all-devices"`

    - `"current-device"`

    - `"all-devices"`

  - `status: "connected" or "connecting" or "needs_login" or 2 more`

    - `"connected"`

    - `"connecting"`

    - `"needs_login"`

    - `"logged_out"`

    - `"unknown"`

  - `accountIDs: optional array of string`

    Chat accounts that belong to this bridge login, when known.

  - `statusText: optional string`

    Human-friendly bridge login status text.

  - `user: optional User`

    User the account belongs to.

    - `id: string`

      Stable Beeper user ID. Use as the primary key when referencing a person.

    - `cannotMessage: optional boolean`

      True if Beeper cannot initiate messages to this user (e.g., blocked, network restriction, or no DM path). The user may still message you.

    - `email: optional string`

      Email address if known. Not guaranteed verified.

    - `fullName: optional string`

      Display name as shown in clients (e.g., 'Alice Example'). May include emojis.

    - `imgURL: optional string`

      Avatar image URL if available. This may be a remote URL, media URL, data URL, or local file URL depending on the source. May be temporary or available only on this device; download promptly if durable access is needed.

    - `isSelf: optional boolean`

      True if this user represents the authenticated account's own identity.

    - `phoneNumber: optional string`

      User's phone number in E.164 format (e.g., '+14155552671'). Omit if unknown.

    - `username: optional string`

      Human-readable handle if available (e.g., '@alice'). May be network-specific and not globally unique.

### Example

```http
curl http://localhost:23373/v1/bridges/$BRIDGE_ID/logins \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN"
```

#### Response

```json
{
  "items": [
    {
      "bridgeID": "bridgeID",
      "loginID": "loginID",
      "removeScopes": [
        "current-device"
      ],
      "status": "connected",
      "accountIDs": [
        "string"
      ],
      "statusText": "statusText",
      "user": {
        "id": "id",
        "cannotMessage": true,
        "email": "email",
        "fullName": "fullName",
        "imgURL": "imgURL",
        "isSelf": true,
        "phoneNumber": "phoneNumber",
        "username": "username"
      }
    }
  ]
}
```

## Get bridge login

**get** `/v1/bridges/{bridgeID}/logins/{loginID}`

Get one bridge login.

### Path Parameters

- `bridgeID: string`

  Bridge ID.

- `loginID: string`

  Bridge login ID.

### Returns

- `BridgeLogin object { bridgeID, loginID, removeScopes, 4 more }`

  Signed-in identity for a bridge. One bridge login can contain multiple chat accounts.

  - `bridgeID: string`

    Bridge ID.

  - `loginID: string`

    Bridge login ID.

  - `removeScopes: array of "current-device" or "all-devices"`

    - `"current-device"`

    - `"all-devices"`

  - `status: "connected" or "connecting" or "needs_login" or 2 more`

    - `"connected"`

    - `"connecting"`

    - `"needs_login"`

    - `"logged_out"`

    - `"unknown"`

  - `accountIDs: optional array of string`

    Chat accounts that belong to this bridge login, when known.

  - `statusText: optional string`

    Human-friendly bridge login status text.

  - `user: optional User`

    User the account belongs to.

    - `id: string`

      Stable Beeper user ID. Use as the primary key when referencing a person.

    - `cannotMessage: optional boolean`

      True if Beeper cannot initiate messages to this user (e.g., blocked, network restriction, or no DM path). The user may still message you.

    - `email: optional string`

      Email address if known. Not guaranteed verified.

    - `fullName: optional string`

      Display name as shown in clients (e.g., 'Alice Example'). May include emojis.

    - `imgURL: optional string`

      Avatar image URL if available. This may be a remote URL, media URL, data URL, or local file URL depending on the source. May be temporary or available only on this device; download promptly if durable access is needed.

    - `isSelf: optional boolean`

      True if this user represents the authenticated account's own identity.

    - `phoneNumber: optional string`

      User's phone number in E.164 format (e.g., '+14155552671'). Omit if unknown.

    - `username: optional string`

      Human-readable handle if available (e.g., '@alice'). May be network-specific and not globally unique.

### Example

```http
curl http://localhost:23373/v1/bridges/$BRIDGE_ID/logins/$LOGIN_ID \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN"
```

#### Response

```json
{
  "bridgeID": "bridgeID",
  "loginID": "loginID",
  "removeScopes": [
    "current-device"
  ],
  "status": "connected",
  "accountIDs": [
    "string"
  ],
  "statusText": "statusText",
  "user": {
    "id": "id",
    "cannotMessage": true,
    "email": "email",
    "fullName": "fullName",
    "imgURL": "imgURL",
    "isSelf": true,
    "phoneNumber": "phoneNumber",
    "username": "username"
  }
}
```

## Remove bridge login

**post** `/v1/bridges/{bridgeID}/logins/{loginID}/remove`

Remove a bridge login from this device or, when supported by the bridge, from all devices.

### Path Parameters

- `bridgeID: string`

  Bridge ID.

- `loginID: string`

  Bridge login ID.

### Body Parameters

- `scope: "current-device" or "all-devices"`

  Where this bridge login should be removed.

  - `"current-device"`

  - `"all-devices"`

### Returns

- `bridgeID: string`

- `loginID: string`

- `scope: "current-device" or "all-devices"`

  Where this bridge login should be removed.

  - `"current-device"`

  - `"all-devices"`

- `status: "removed"`

  - `"removed"`

- `affectedAccountIDs: optional array of string`

### Example

```http
curl http://localhost:23373/v1/bridges/$BRIDGE_ID/logins/$LOGIN_ID/remove \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $BEEPER_ACCESS_TOKEN" \
    -d '{
          "scope": "current-device"
        }'
```

#### Response

```json
{
  "bridgeID": "bridgeID",
  "loginID": "loginID",
  "scope": "current-device",
  "status": "removed",
  "affectedAccountIDs": [
    "string"
  ]
}
```

## Domain Types

### Login List Response

- `LoginListResponse object { items }`

  - `items: array of BridgeLogin`

    - `bridgeID: string`

      Bridge ID.

    - `loginID: string`

      Bridge login ID.

    - `removeScopes: array of "current-device" or "all-devices"`

      - `"current-device"`

      - `"all-devices"`

    - `status: "connected" or "connecting" or "needs_login" or 2 more`

      - `"connected"`

      - `"connecting"`

      - `"needs_login"`

      - `"logged_out"`

      - `"unknown"`

    - `accountIDs: optional array of string`

      Chat accounts that belong to this bridge login, when known.

    - `statusText: optional string`

      Human-friendly bridge login status text.

    - `user: optional User`

      User the account belongs to.

      - `id: string`

        Stable Beeper user ID. Use as the primary key when referencing a person.

      - `cannotMessage: optional boolean`

        True if Beeper cannot initiate messages to this user (e.g., blocked, network restriction, or no DM path). The user may still message you.

      - `email: optional string`

        Email address if known. Not guaranteed verified.

      - `fullName: optional string`

        Display name as shown in clients (e.g., 'Alice Example'). May include emojis.

      - `imgURL: optional string`

        Avatar image URL if available. This may be a remote URL, media URL, data URL, or local file URL depending on the source. May be temporary or available only on this device; download promptly if durable access is needed.

      - `isSelf: optional boolean`

        True if this user represents the authenticated account's own identity.

      - `phoneNumber: optional string`

        User's phone number in E.164 format (e.g., '+14155552671'). Omit if unknown.

      - `username: optional string`

        Human-readable handle if available (e.g., '@alice'). May be network-specific and not globally unique.

### Login Remove Response

- `LoginRemoveResponse object { bridgeID, loginID, scope, 2 more }`

  - `bridgeID: string`

  - `loginID: string`

  - `scope: "current-device" or "all-devices"`

    Where this bridge login should be removed.

    - `"current-device"`

    - `"all-devices"`

  - `status: "removed"`

    - `"removed"`

  - `affectedAccountIDs: optional array of string`
