Skip to content
Download Beeper

Get bridge login session

$client->bridges->loginSessions->retrieve(string loginSessionID, string bridgeID): LoginSession
GET/v1/bridges/{bridgeID}/login-sessions/{loginSessionID}

Get the current state of a temporary bridge login session.

ParametersExpand Collapse
bridgeID: string

Bridge ID.

loginSessionID: string

Temporary bridge login session ID.

ReturnsExpand Collapse
string bridgeID

Bridge ID.

string loginSessionID

Temporary bridge login session ID.

Status status
?Account account

A chat account added to Beeper.

?string accountID

Chat account ID for reconnect flows, when known.

?CurrentStep currentStep

Step the client should show or complete next. Omitted when the session is complete, cancelled, or failed.

?APIError error
?Login login

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

?string loginID

Bridge login ID for reconnect flows, when known.

Get bridge login session

<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

$client = new Client(accessToken: 'My Access Token');

$loginSession = $client->bridges->loginSessions->retrieve(
  '123', bridgeID: 'local-whatsapp'
);

var_dump($loginSession);
{
  "bridgeID": "bridgeID",
  "loginSessionID": "loginSessionID",
  "status": "waiting_for_input",
  "account": {
    "accountID": "accountID",
    "bridge": {
      "id": "id",
      "provider": "cloud",
      "type": "type"
    },
    "status": "connected",
    "user": {
      "id": "id",
      "cannotMessage": true,
      "email": "email",
      "fullName": "fullName",
      "imgURL": "imgURL",
      "isSelf": true,
      "phoneNumber": "phoneNumber",
      "username": "username"
    },
    "capabilities": {
      "foo": "bar"
    },
    "loginID": "loginID",
    "network": "network",
    "statusText": "statusText"
  },
  "accountID": "accountID",
  "currentStep": {
    "fields": [
      {
        "id": "id",
        "initialValue": "initialValue",
        "label": "label",
        "optional": true,
        "placeholder": "placeholder",
        "type": "type"
      }
    ],
    "stepID": "stepID",
    "type": "user_input",
    "attachments": [
      {}
    ],
    "instructions": "instructions"
  },
  "error": {
    "code": "code",
    "message": "message",
    "details": {
      "foo": "bar"
    }
  },
  "login": {
    "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"
    }
  },
  "loginID": "loginID"
}
Returns Examples
{
  "bridgeID": "bridgeID",
  "loginSessionID": "loginSessionID",
  "status": "waiting_for_input",
  "account": {
    "accountID": "accountID",
    "bridge": {
      "id": "id",
      "provider": "cloud",
      "type": "type"
    },
    "status": "connected",
    "user": {
      "id": "id",
      "cannotMessage": true,
      "email": "email",
      "fullName": "fullName",
      "imgURL": "imgURL",
      "isSelf": true,
      "phoneNumber": "phoneNumber",
      "username": "username"
    },
    "capabilities": {
      "foo": "bar"
    },
    "loginID": "loginID",
    "network": "network",
    "statusText": "statusText"
  },
  "accountID": "accountID",
  "currentStep": {
    "fields": [
      {
        "id": "id",
        "initialValue": "initialValue",
        "label": "label",
        "optional": true,
        "placeholder": "placeholder",
        "type": "type"
      }
    ],
    "stepID": "stepID",
    "type": "user_input",
    "attachments": [
      {}
    ],
    "instructions": "instructions"
  },
  "error": {
    "code": "code",
    "message": "message",
    "details": {
      "foo": "bar"
    }
  },
  "login": {
    "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"
    }
  },
  "loginID": "loginID"
}