# Logins

## List bridge logins

`client.bridges.logins.list(stringbridgeID, RequestOptionsoptions?): LoginListResponse`

**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.

### Parameters

- `bridgeID: string`

  Bridge ID.

### Returns

- `LoginListResponse`

  - `items: Array<BridgeLogin>`

    - `bridgeID: string`

      Bridge ID.

    - `loginID: string`

      Bridge login ID.

    - `removeScopes: Array<"current-device" | "all-devices">`

      - `"current-device"`

      - `"all-devices"`

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

      - `"connected"`

      - `"connecting"`

      - `"needs_login"`

      - `"logged_out"`

      - `"unknown"`

    - `accountIDs?: Array<string>`

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

    - `statusText?: string`

      Human-friendly bridge login status text.

    - `user?: User`

      User the account belongs to.

      - `id: string`

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

      - `cannotMessage?: 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?: string`

        Email address if known. Not guaranteed verified.

      - `fullName?: string`

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

      - `imgURL?: 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?: boolean`

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

      - `phoneNumber?: string`

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

      - `username?: string`

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

### Example

```typescript
import BeeperDesktop from '@beeper/desktop-api';

const client = new BeeperDesktop({
  accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted
});

const logins = await client.bridges.logins.list('local-whatsapp');

console.log(logins.items);
```

#### 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

`client.bridges.logins.retrieve(stringloginID, LoginRetrieveParamsparams, RequestOptionsoptions?): BridgeLogin`

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

Get one bridge login.

### Parameters

- `loginID: string`

  Bridge login ID.

- `params: LoginRetrieveParams`

  - `bridgeID: string`

    Bridge ID.

### Returns

- `BridgeLogin`

  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<"current-device" | "all-devices">`

    - `"current-device"`

    - `"all-devices"`

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

    - `"connected"`

    - `"connecting"`

    - `"needs_login"`

    - `"logged_out"`

    - `"unknown"`

  - `accountIDs?: Array<string>`

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

  - `statusText?: string`

    Human-friendly bridge login status text.

  - `user?: User`

    User the account belongs to.

    - `id: string`

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

    - `cannotMessage?: 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?: string`

      Email address if known. Not guaranteed verified.

    - `fullName?: string`

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

    - `imgURL?: 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?: boolean`

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

    - `phoneNumber?: string`

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

    - `username?: string`

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

### Example

```typescript
import BeeperDesktop from '@beeper/desktop-api';

const client = new BeeperDesktop({
  accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted
});

const bridgeLogin = await client.bridges.logins.retrieve('ba_EvYDBBsZbRQAy3UOSWqG0LuTVkc', {
  bridgeID: 'local-whatsapp',
});

console.log(bridgeLogin.bridgeID);
```

#### 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

`client.bridges.logins.remove(stringloginID, LoginRemoveParamsparams, RequestOptionsoptions?): LoginRemoveResponse`

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

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

### Parameters

- `loginID: string`

  Bridge login ID.

- `params: LoginRemoveParams`

  - `bridgeID: string`

    Path param: Bridge ID.

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

    Body param: Where this bridge login should be removed.

    - `"current-device"`

    - `"all-devices"`

### Returns

- `LoginRemoveResponse`

  - `bridgeID: string`

  - `loginID: string`

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

    Where this bridge login should be removed.

    - `"current-device"`

    - `"all-devices"`

  - `status: "removed"`

    - `"removed"`

  - `affectedAccountIDs?: Array<string>`

### Example

```typescript
import BeeperDesktop from '@beeper/desktop-api';

const client = new BeeperDesktop({
  accessToken: process.env['BEEPER_ACCESS_TOKEN'], // This is the default and can be omitted
});

const login = await client.bridges.logins.remove('ba_EvYDBBsZbRQAy3UOSWqG0LuTVkc', {
  bridgeID: 'local-whatsapp',
  scope: 'current-device',
});

console.log(login.bridgeID);
```

#### Response

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

## Domain Types

### Login List Response

- `LoginListResponse`

  - `items: Array<BridgeLogin>`

    - `bridgeID: string`

      Bridge ID.

    - `loginID: string`

      Bridge login ID.

    - `removeScopes: Array<"current-device" | "all-devices">`

      - `"current-device"`

      - `"all-devices"`

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

      - `"connected"`

      - `"connecting"`

      - `"needs_login"`

      - `"logged_out"`

      - `"unknown"`

    - `accountIDs?: Array<string>`

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

    - `statusText?: string`

      Human-friendly bridge login status text.

    - `user?: User`

      User the account belongs to.

      - `id: string`

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

      - `cannotMessage?: 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?: string`

        Email address if known. Not guaranteed verified.

      - `fullName?: string`

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

      - `imgURL?: 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?: boolean`

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

      - `phoneNumber?: string`

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

      - `username?: string`

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

### Login Remove Response

- `LoginRemoveResponse`

  - `bridgeID: string`

  - `loginID: string`

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

    Where this bridge login should be removed.

    - `"current-device"`

    - `"all-devices"`

  - `status: "removed"`

    - `"removed"`

  - `affectedAccountIDs?: Array<string>`
